Array.dequeue Function
Removes the first element from the specified Array object and returns it.
var firstElement = Array.dequeue(array);
The following example shows how to remove the first element from an array by using the dequeue function.
var myArray = []; var result = ""; Array.add(myArray, 'a'); Array.add(myArray, 'b'); Array.add(myArray, 'c'); Array.add(myArray, 'd'); result = Array.dequeue(myArray); // View the results: "b,c,d" alert("Dequeue result: " + result + "myArray: " + myArray.toString());
Show: