push
Last updated
Adds a new value to an array. An array has to be created using the newArray function first, before using the push function to add values to the array.
var
The name of the array to add a new value to.
String/Text
-
-
Yes
value
The value to be added to the array.
String/Text
-
-
Yes
The updated array of values.
Array/List
N/A
Coming Soon.
The user wants to add new value into the array.
Call the function "newArray" and set the variable name. var: listOfFruits

Call the function "push" and define the value. value: mango

Call the function "push" and define the value. value: jackfruits

Add a console and call the function "getVar" to view the values in "listOfFruits" array. value = getVar = listOfFruits

"mango" and "jackfruits" are added to the array successfully.

Last updated