Skip to content

Commit b69e7cf

Browse files
committed
Merge pull request codebar#92 from passy/patch-2
Mention `array.shift()`
2 parents cd109f5 + ee5f596 commit b69e7cf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

js/lesson2/tutorial.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ animals.unshift("cow")
105105

106106
> What do you expect to get when apply `pop()` to the animals array? Try it out.
107107
108+
Analogously, `array.shift()` removes and returns the *first* element of the array.
109+
108110
### Ordering
109111

110112
To order the elements of an array we can use `sort()`.

0 commit comments

Comments
 (0)