-
Notifications
You must be signed in to change notification settings - Fork 15
JSArray.Shift
boxgaming edited this page Jul 25, 2026
·
2 revisions
Removes the first element from an array and returns that element.
result = JSArray.Shift ( a )
- The a parameter contains the native Javascript array on which the operation will be performed.
Import JSArray From "lib/lang/array.bas"
Import JSArray From "lib/lang/array.bas"
Dim plants As Object
plants = JSArray.Create("broccoli", "cauliflower", "cabbage", "kale", "tomato")
Print JSArray.Shift(plants)
Print JSArray.Join(plants)
Print
Print JSArray.Shift(plants)
Print JSArray.Join(plants)broccoli
cauliflower,cabbage,kale,tomato
cauliflower
cabbage,kale,tomato
JSArray.Create
JSArray.Join
JSArray.Pop
JSArray.Unshift
JavaScript - Array.shift()