Which statement correctly contrasts shift and unshift?
Both remove the first element
shift returns the removed first element; unshift returns the new length✓Correct answer
shift adds at the beginning; unshift removes from it
Neither method changes the array
Explanation
shift removes and returns the first element, whereas unshift adds at the beginning and returns the new length. Saying both return an element overlooks that insertion methods report length instead.