A-C > Array.pop

Array.pop

Syntax

myArray.pop();

Arguments

None.

Description

Method; removes the last element from an array and returns the value of that element.

Player

Flash 5 or later.

Example

The following code creates the myPets array containing four elements, then removes its last element:

myPets = ["cat", "dog", "bird", "fish"];
popped = myPets.pop();