JavaScript Array shift()
JavaScript Array shift()
The shift() method is used to remove the first item of an array. It changes the original array and returns the shifted element.
Syntax:-
Its syntax is:- array.shift()
Return:-
Its return is:- The removed item.