return arr.shift() doesn’t return arr. Rather it returns the value we get from arr.shift()
The shift method removes the element at the zeroeth index
and shifts the values at consecutive indexes down, then returns the
removed value. If the length property is 0, undefined is returned.
Does that make sense?