array.shift [method]

array.shift()

removes one item from the beginning of array or emits a warning if there are no items in the array, returns the removed item

a = [ 5, 6 ];
a.shift(); // a = [6], returned 5