1
2
3
4
5
6
7
8
9
10
To practice on your own, or to check code you believe shouldn't have been scored as incorrect, go to CodePen.
0,1,2,3,4,5,6,7,8,9
0
0
0
0
What is the keyword that removes the last element of an array? | pop | pop | |
What is the keyword that adds one or more elements to the end of an array? | push | push | |
What is the keyword that removes the first element of an array? | shift | shift | |
What is the keyword that adds one or more elements to the beginning of an array. | unshift | unshift | |
Remove the last element from the array x. | x.pop(); | x\.pop\(\); | |
Add the integer 1 to the end of the array x. | x.push(1); | x\.push\(1\); | |
Remove the first element from the array x. | x.shift(); | x\.shift\(\); | |
Add two elements, the integers 1 and 2, to the beginning of the array x. | x.unshift(1, 2); | x\.unshift\(1,2\); | |
|
|||
|