1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-28 21:32:20 +00:00

Merge pull request #1097 from ConradZhangcong/gh-pages

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

View File

@ -845,8 +845,8 @@ arr.flatMap(function callback(currentValue[, index[, array]]) {
```javascript
const arr = [5, 12, 8, 130, 44];
arr.at[2] // 8
arr.at[-2] // 130
arr.at(2) // 8
arr.at(-2) // 130
```
如果参数位置超出了数组范围,`at()`返回`undefined`