![]() ![]() | |
Flash Player 5.
my_array.pop()
None.
The value of the last element in the specified array.
Method; removes the last element from an array and returns the value of that element.
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
![]() ![]() | |