Codington
0 of 8 problems solved • 0%
Use in a course

Exercise prompt

Remove with Pop

.pop() removes and returns the last array value.

Example

const sizes = ["S", "M", "L"]; const removed = sizes.pop();

Your task

Predict the removed value and remaining items by replacing the empty text. Then use .pop() to calculate the actual values. Both lines should contain lamp | book,pen.

Hint

Notice that .pop() changes the array and gives a value back.