shift deletes the first index of that array and moves all indexes to the left. It changes the original array.
shift
let array = [1, 2, 3]; array.shift(); // Result: array = [2,3]
Last updated 3 years ago