-
Notifications
You must be signed in to change notification settings - Fork 15
JSArray.Concat
boxgaming edited this page Jul 25, 2026
·
3 revisions
Concatenates one or more variables and/or arrays into a new array.
newArray = JSArray.Concat (a, item1 [, item2, ... itemN])
- The a parameter contains the native Javascript array on which the operation will be performed.
- Valid item 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")
Dim otherColors(2) As String
otherColors(1) = "black"
otherColors(2) = "purple"
Dim allColors As Object
allColors = JSArray.Concat(colors, otherColors, "pink", "brown")
Print JSArray.Length(allColors)
Print JSArray.Item(allColors, 6)
Print JSArray.Item(allColors, 8)10
black
pink