Skip to content

JSArray.Clear

boxgaming edited this page Jul 25, 2026 · 4 revisions

Removes all values from a given array.

Syntax

JSArray.Clear a

Parameters

  • The a parameter contains the native Javascript array on which the operation will be performed.

Example

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

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

JSArray.Clear colors

Print JSArray.Length(colors)

Output

6
0

See Also

JSArray.Create
JSArray.Length

Clone this wiki locally