Array Methods Flashcards

1
Q

Removes last element in array and returns the removed element

A

pop()

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

Adds a new element to an array and returns the new array length

A

push()

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

Removes the first array element and moves all the other elements to a lower index and returns the removed element

A

shift()

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

Adds a new element to an array at the beginning and returns the new array length

A

unshift()

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