Array Methods Flashcards
(4 cards)
1
Q
What does push( ) do?
A
Adds elements to the end of an array
2
Q
What does pop( ) do?
A
Removes the last element from an array
3
Q
What does shift( ) do?
A
Removes the first element from an array
4
Q
What does unshift( ) do?
A
Adds an element to the beginning of an array