Whatever message this page gives is out now! Go check it out!
ArrayShift(array)array.shift()| Parameter | Required/Optional | Description |
array | Required | The array to update. |
<cfscript>
arr=["Jan","Feb","Mar","Apr","May"]
shiftedElement=ArrayShift(arr)
WriteOutput(shiftedElement) // Returns Jan
</cfscript><cfscript>
arr=[{"id":101,"name":"John"},
{"id":102,"name":"Paul"},
{"id":103,"name":"George"}
]
shifted=ArrayShift(arr)
WriteDump(shifted)
</cfscript>