Array.last

Returns the last element of the array. The array must not be empty, otherwise, an error will occur.

Arguments

None

Return values

value
is the last entry in the array.

Complexity

Constant

Example

"sl/array" useFile a: (-1 2 3 5 6 "7") makeArray; a.last print
Output:
7