JavaScript Array shift() Method
JavaScript Array.shift() method removes (or delete) the first element from an array and returns the element that it removed. The shift() method changes the length of an array. It works just like the pop() method, but with one difference: The…
