-
Notifications
You must be signed in to change notification settings - Fork 15
JSArray.Insert
boxgaming edited this page Jul 25, 2026
·
3 revisions
Inserts items(s) into an array at a specified index location.
JSArray.Insert a, index%, item1 [, item2, ... itemN]
- The a parameter contains the native JavaScript array on which the operation will be performed.
- The index% parameter indicates the zero-based index at which to start changing the array.
- One or more item parameters can be passed to the method. Items will be inserted into the array in the order they appear in the list.
Import JSArray From "lib/lang/array.bas"
Dim months As Object
months = JSArray.Create("Jan", "Mar", "Apr", "Jul")
JSArray.Insert months, 1, "Feb"
Print JSArray.Join(months)
JSArray.Insert months, 4, "May", "Jun"
Print JSArray.Join(months)Jan,Feb,Mar,Apr,Jul
Jan,Feb,Mar,Apr,May,Jun,Jul