Array
Methods for the array type.
| Name | Summary |
|---|---|
| append | Appends a value to the end of the array in-place. |
| clear | Removes all elements from the array. |
| filter | Returns a new array with elements that pass the test implemented by the provided function. |
| join | Joins the elements of the array into a string using the specified separator. |
| len | Returns the number of elements in the array. |
| map | Returns a new array with each element transformed by the provided function. |
| pop | Removes and returns the last element of the array. |
| remove | Removes and returns the element at the specified index. |
| reverse | Reverses the order of the elements in the array in-place. |
| toTuple | Converts the array to a tuple. |
fn array.append(object) -> null
Appends a value to the end of the array in-place.
Parameters
| object | The value to append to the array. |
null
fn array.clear() -> null
Removes all elements from the array.
Returns
null
fn array.len() -> int
Returns the number of elements in the array.
Returns
int
fn array.pop() -> object
Removes and returns the last element of the array.
Returns
object
Removes and returns the element at the specified index.
Parameters
| index | The index of the element to remove. |
result<object>
fn array.toTuple() -> tuple
Converts the array to a tuple.
Returns
tuple