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

Update array.md

This commit is contained in:
ConradZhangcong 2021-11-23 11:30:52 +08:00
parent c039b6f2c2
commit 74de293878

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`