Skip to main content

Arrays

FunctionDescriptionMeta
array.concat

z := array.concat(x, y)

Concatenates two arrays.

Arguments:
x (array[any])

the first array

y (array[any])

the second array

Returns:
z (array[any])

the concatenation of x and y

Wasm
array.reverse

rev := array.reverse(arr)

Returns the reverse of a given array.

Arguments:
arr (array[any])

the array to be reversed

Returns:
rev (array[any])

an array containing the elements of arr in reverse order

v0.36.0 Wasm
array.slice

slice := array.slice(arr, start, stop)

Returns a slice of a given array. If start is greater or equal than stop, slice is [].

Arguments:
arr (array[any])

the array to be sliced

start (number)

the start index of the returned slice; if less than zero, it's clamped to 0

stop (number)

the stop index of the returned slice; if larger than count(arr), it's clamped to count(arr)

Returns:
slice (array[any])

the subslice of array, from start to end, including arr[start], but excluding arr[end]

Wasm