Array.shift

Function/Meaning

Takes one element from the beginning of the array and returns it.

Type
Arrayclassmethod of
Syntax
shift() :variant
Arguments
Return value

Returns the retrieved element. Returns void if there are no elements.

Explanation

The retrieved element is removed from the array (the size of the array is reduced by one).