Click or drag to resize

array.last Function

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
array.last Function

The array.last function returns the last element (the tail) of a given array.

Syntax

Alchemy
array.last(ident);

Nomenclature

ident Required. The array to find the last element of

Returns

The last (tail) element of the given array.

Example

Alchemy
$arr = array.new(2, 3, 4);
PRINT array.last($arr); /* 4 */

See Also

  • array.first - get the first element of an array

  • array.pop - remove and return the element at the head of the array

  • array.range - return a sub-array from a specified array

  • array.get_at - retrieve the data at a specified index of an array

  • length - get the number of elements in an array