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:
parent
c039b6f2c2
commit
74de293878
@ -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`。
|
||||
|
Loading…
x
Reference in New Issue
Block a user