Array.prototype.shiftintermediateconst arr = ['a', 'b', 'c']
arr.shift()
console.log(arr) // β ['b', 'c'] (mutated!)shift() mutates the original array and re-indexes all remaining elements.
shift() modifies the array in place: after calling it, the array is one element shorter and all remaining elements shift left by one position.
const arr = [10, 20, 30]
arr.shift()
// arr === [20, 30]