Section 24.11. Array.push( ): append elements to an array


24.11. Array.push( ): append elements to an array

ECMAScript v3

24.11.1. Synopsis

array.push(value, ...)

24.11.1.1. Arguments

value, ...

One or more values to be appended to the end of array.

24.11.1.2. Returns

The new length of the array, after the specified values are appended to it.

24.11.2. Description

push( ) appends its arguments, in order, to the end of array. It modifies array directly, rather than creating a new array. push( ), and its companion method pop( ), use arrays to provide the functionality of a first in, last out stack. See Array.pop( ) for an example.

24.11.3. See Also

 Array.pop( ) 




JavaScript. The Definitive Guide
JavaScript: The Definitive Guide
ISBN: 0596101996
EAN: 2147483647
Year: 2004
Pages: 767

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net