pops the first element from an array and shift the rest of the values to the left. In case the array is empty an exception is thrown,
unless the second argument "defaultValue" is provided, in that case that value is returned.
Lucee object methods reference
Object Method Array.shift
Array.shift([any defaultValue]):any
Category
array
Arguments
The arguments for this function are set. You can not use other arguments except the following ones.
Name | Type | Required | Description |
---|---|---|---|
defaultValue | any | No | this value is returned in case the array is empty |