Push

From NSB App Studio
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Push(array, item)

Description

The Push() method adds an item to end of an array. This function changes the original array. It returns the number of items in the array after adding the new item.

Example

var fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.push("strawberry")

fruits = ["Banana", "Orange", "Apple", "Mango"]
count=Push(fruits,"Strawberry")

Output

The new value of fruits will be:

Banana,Orange,Apple,Mango,Strawberry

Related Items

Array, Dim, LBound, Splice, ReDim