The shift method removes and returns the first element of an array. This affects the length of the array.
cars = ["Mercedes", "Ford", "Chrysler"]
document.write(cars.shift())
Mercedes
This example creates an array called 'cars' with the listed elements, and the shift method then removes and returns the first element "Mercedes" leaving just the two elements "Ford" and "Chrysler" in the array: