1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-25 03:02:21 +00:00

Merge pull request #1094 from ConradZhangcong/gh-pages

fix typo
This commit is contained in:
Ruan YiFeng 2021-11-22 15:50:37 +08:00 committed by GitHub
commit c039b6f2c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -443,8 +443,8 @@ str.replaceAll(regex, replacer)
```javascript
const str = 'hello';
str.at[1] // "e"
str.at[-1] // "o"
str.at(1) // "e"
str.at(-1) // "o"
```
如果参数位置超出了字符串范围,`at()`返回`undefined`