-
Notifications
You must be signed in to change notification settings - Fork 15
JSArray.Create
boxgaming edited this page Jul 25, 2026
·
3 revisions
Creates a new array. If no parameters are specified a new, empty array will be created.
a = JSArray.Create ([item1, item2, ... itemN])
- The optional item parameters can be used to prepopulate the array. Valid items parameters can be strings, numbers, objects, QBasic arrays or other native Javascript arrays.
Import JSArray From "lib/lang/array.bas"
Dim colors As Object
colors = JSArray.Create("red", "green", "blue", "orange", "yellow", "white")
Print JSArray.Length(colors)
Print JSArray.Item(colors, 0)
Dim moreColors As Object
moreColors = JSArray.Create(colors, "black", "purple")
Print JSArray.Length(moreColors)
Print JSArray.At(moreColors, -1)6
8
purple