.pop() removes and returns the last array value.
const sizes = ["S", "M", "L"];
const removed = sizes.pop();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.
Notice that .pop() changes the array and gives a value back.