A-C > Array.pop |
![]() ![]() ![]() |
Array.pop
Availability
Flash Player 5.
Usage
myArray
.pop()
Parameters
None.
Returns
Nothing.
Description
Method; removes the last element from an array and returns the value of that element.
Example
The following code creates the myPets
array containing four elements, then removes its last element.
myPets = ["cat", "dog", "bird", "fish"];
popped = myPets.pop();
trace(popped); // returns fish
![]() ![]() ![]() |