-
Notifications
You must be signed in to change notification settings - Fork 15
JSArray.Push
boxgaming edited this page Jul 25, 2026
·
2 revisions
Adds the specified elements to the end of an array.
JSArray.Push a, item1 [, item2, ... itemN]
- The a parameter contains the native Javascript array on which the operation will be performed.
- One or more item parameters can be passed to the method. Items will be added to the end of the array in the order they appear in the list.
Import JSArray From "lib/lang/array.bas"
Dim numbers As Object
numbers = JSArray.Create("one", "two")
JSArray.Push numbers, "three"
Print JSArray.Length(numbers)
Print JSArray.Join(numbers)
JSArray.Push numbers, "four", "five", "six"
Print JSArray.Length(numbers)
Print JSArray.Join(numbers)3
one,two,three
6
one,two,three,four,five,six
JSArray.Add
JSArray.Create
JSArray.Join
JSArray.Length
Javascript - Array.push()