JavaScript Objects The Array Object- push() - Javascript Objects

What is JavaScript - Array push() Method?

Javascript array push() method appends the given element(s) in the last of the array and returns the length of the new array.


Its syntax is as follows −

Parameter Details

element1, ..., elementN: The elements to add to the end of the array.

Return Value

Returns the length of the new array.


Try the following example.


new numbers is : 1,4,9,10

new numbers is : 1,4,9,10,20

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

Javascript Objects Topics