AvailabilityJavaScript 1.2; JScript 5.5; ECMAScript v3 Synopsisarray.push(value, ...) Arguments
ReturnsThe new length of the array, after the specified values are appended to it. Descriptionpush( ) 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. BugsIn Netscape's implementations of JavaScript, when the language version is explicitly set to 1.2 this function returns the last value appended, rather than returning the new array length. See Also |