JavaScript Shift() function is used to remove the first element of array and return the same element. See code snippet:
JavaScript Shift()