-
Notifications
You must be signed in to change notification settings - Fork 15
JSArray.At
boxgaming edited this page Jul 25, 2026
·
6 revisions
Takes an integer value and returns the item at that index, allowing for positive and negative integers. Negative integers count back from the last item in the array.
result = JSArray.At (a, index%)
- The a parameter contains the native Javascript array on which the operation will be performed.
- index% specifies the 0-based index of the item to retrieve from the array. Negative integers count back from the last item in the array.
Import JSArray From "lib/lang/array.bas"
Dim colors As Object
colors = JSArray.Create("red", "green", "blue", "orange", "yellow", "white")
Print JSArray.At(colors, 0)
Print JSArray.At(colors, 2)
Print JSArray.At(colors, -1)
Print JSArray.At(colors, -3)red
blue
white
orange