Array Methods Flashcards

(4 cards)

1
Q

What does push( ) do?

A

Adds elements to the end of an array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does pop( ) do?

A

Removes the last element from an array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does shift( ) do?

A

Removes the first element from an array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does unshift( ) do?

A

Adds an element to the beginning of an array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly