Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

push

The push() method of the Array object adds one or more elements onto the end of an array.

Syntaxarray.push( ...items )

Parameters

...items One or more pieces of data separated by commas.

Examples

var gods = ["Jehovah","Allah"]; gods.push("Shiva","Buddha"); alert( gods ); /* Jehovah,Allah,Shiva,Buddha */

JavaScript

Methods

addEventListeneralertaveragebackblurconcatcreatedecodeURIdecodeURIComponentencodeURIencodeURIComponentevaleveryfilterforwardgoisArrayisFiniteisNaNjoinparseFloatparseIntpoppushpushStatereducereplaceStatereverseshiftshuffleslicesomesortspliceunshiftwrite