Skip to content

JSArray.Remove

boxgaming edited this page Jul 25, 2026 · 2 revisions

Removes one or more elements from an array at a specified index location.

Syntax

JSArray.Remove a, start% [, deleteCount%]

Parameters

  • The a parameter contains the native JavaScript array on which the operation will be performed.
  • The start% parameter indicates the zero-based index at which to start changing the array.
  • The deleteCount% parameter indicates the number of elements in the array to remove from start.

Example

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

Dim numbers As Object
numbers = JSArray.Create(1, 2, 3, 5, 4, 7, 7, 5)

JSArray.Remove numbers, 3
Print JSArray.Join(numbers)

JSArray.Remove numbers, 4, 2
Print JSArray.Join(numbers)

Output

1,2,3,4,7,7,5
1,2,3,4,5

See Also

JSArray.Create
JSArray.Insert
JSArray.Join
JSArray.Slice
JSArray.Splice

Clone this wiki locally