next up previous contents
Next: slice Up: Methods Previous: reverse   Contents


shift

Description

Removes the first element from an array and returns that element.


Syntax

array1.shift()


Parameters

None


Returns

The first element in an array. example:

a = new Array("a", "b", "c", "d");
trace(a.shift());
//output: a
trace(a);
//output: b,c,d




Copyright ©2000-2010 Shanghai TopCMM Software Technologies. All Rights Reserved.