Skip to content

JSArray.Item

boxgaming edited this page Jul 25, 2026 · 4 revisions

Returns the value of an array at the specified index.

Syntax

result = JSArray.Item (a, index%)

Parameters

  • 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.

Example

Import JSArray From "lib/lang/array.bas"

Dim colors As Object
colors = JSArray.Create("red", "green", "blue", "orange", "yellow", "white")

Print JSArray.Item(colors, 0)
Print JSArray.Item(colors, 3)

Output

red
orange

See Also

JSArray.Create
JSArray.At

Clone this wiki locally