Does it mutate 😱
Array.prototype.shift
Mutates
Description
The shift() method removes the first element from an array and returns that element. This method changes the length of the array.
Array.prototype.shift ( )
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/shift
Example
var array1 = [1, 2, 3];
var firstElement = array1.shift();
console.log(array1);
// expected output: Array [2, 3]
console.log(firstElement);
// expected output: 1