Predeclared in ARRAYS

Functions

array_length(x) → {number}

**primitive**; returns the current length of array x, which is 1 plus the highest index that has been used so far in an array assignment on x. Here literal array expressions are counted too: The array [10, 20, 30] has a length of 3. Time: Θ(1), space: Θ(1)
Parameters:
Name Type Description
x array given array
Returns:
current length of array
Type
number

is_array(x) → {boolean}

**primitive**; returns true if x is an array, and false if it is not. Time: Θ(1), space: Θ(1)
Parameters:
Name Type Description
x value given value
Returns:
whether x is an array
Type
boolean