Changed "position" to "index" for slice() method
This commit is contained in:
parent
e9686467e6
commit
6d9b4437a4
1 changed files with 1 additions and 1 deletions
|
@ -712,7 +712,7 @@ A cheat sheet of array methods:
|
|||
- `shift()` -- extracts an item from the beginning,
|
||||
- `unshift(...items)` -- adds items to the beginning.
|
||||
- `splice(pos, deleteCount, ...items)` -- at index `pos` delete `deleteCount` elements and insert `items`.
|
||||
- `slice(start, end)` -- creates a new array, copies elements from position `start` till `end` (not inclusive) into it.
|
||||
- `slice(start, end)` -- creates a new array, copies elements from index `start` till `end` (not inclusive) into it.
|
||||
- `concat(...items)` -- returns a new array: copies all members of the current one and adds `items` to it. If any of `items` is an array, then its elements are taken.
|
||||
|
||||
- To search among elements:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue