A-C > Array.pop |  |

Array.pop

array.pop, pop

Availability

Flash Player 5.

Usage

    myArray.pop()

Parameters

None.

Returns

The value of the last element in the specified array.

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