Array.pop() - MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

Array.pop()

Availability
Flash Player 5.
Usage
my_array.pop() : Object
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
its last element:
var myPets_array:Array = new Array("cat", "dog", "bird", "fish");
var popped:String = myPets_array.pop();
trace(popped); // displays fish
trace(myPets_array); // displays cat,dog,bird
See Also
Array.push(), Array.shift(),
array containing four elements, and then removes
myPets_array
Array.unshift()
Array.pop()
109

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flash mx

Table of Contents