Update array methods article
Update array methods article
This commit is contained in:
parent
04b2fcfba2
commit
a2fc956fe8
1 changed files with 2 additions and 2 deletions
|
@ -10,8 +10,8 @@ We already know methods that add and remove items from the beginning or the end:
|
||||||
|
|
||||||
- `arr.push(...items)` -- adds items to the end,
|
- `arr.push(...items)` -- adds items to the end,
|
||||||
- `arr.pop()` -- extracts an item from the end,
|
- `arr.pop()` -- extracts an item from the end,
|
||||||
- `arr.shift(...items)` -- adds items to the beginning,
|
- `arr.shift()` -- extracts an item from the beginning.
|
||||||
- `arr.unshift()` -- extracts an item from the beginning.
|
- `arr.unshift(...items)` -- adds items to the beginning,
|
||||||
|
|
||||||
Here are few others.
|
Here are few others.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue