Array.push()
Top  Previous  Next


SWiSH Player Support
SWF5 or later - Supported Internally

Syntax
arrayName.push(value1, value2, ...)

Arguments
value: One or more values to add at the end of the array.

Returns
Returns the length of the array after the new value(s) have been added to it.

Description
Method; contains the length of an array after the new value(s) have been added to the end of it.

Samples
onLoad() {
  
  products = new Array("SWiSHlite", "SWiSH 2.0");
    
// array length is '2'
  
  trace("1st Length = " add products.push("SWiSHmax", "SWiSHsites")); 
    
// new array length of '4' is displayed in the debug window
  
  trace("2nd Length = " add products.push("SWiSHpix", "SWiSHstudio"));
    
// new array length of '6' is displayed in the debug window
}