Merge pull request #2146 from Ruslan-Aleev/patch-1
Changed "position" to "index" for slice() method
This commit is contained in:
commit
1f8b72be8f
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,
|
- `shift()` -- extracts an item from the beginning,
|
||||||
- `unshift(...items)` -- adds items to the beginning.
|
- `unshift(...items)` -- adds items to the beginning.
|
||||||
- `splice(pos, deleteCount, ...items)` -- at index `pos` delete `deleteCount` elements and insert `items`.
|
- `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.
|
- `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:
|
- To search among elements:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue