-
Notifications
You must be signed in to change notification settings - Fork 15
JSArray.Add
boxgaming edited this page Jul 25, 2026
·
2 revisions
Adds the specified elements to the end of an array.
This method is functionally identical to the Push method.
JSArray.Add 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.Add numbers, "three"
Print JSArray.Length(numbers)
Print JSArray.Join(numbers)
JSArray.Add numbers, "four", "five", "six"
Print JSArray.Length(numbers)
Print JSArray.Join(numbers)3
one,two,three
6
one,two,three,four,five,six