Skip to main content

array.top()

Returns the value at the end of an array

Availability

Device + Agent

Returns

Any Squirrel data type

Description

This method returns the value at end of the target array — the element with the highest index — but doesn’t remove it from the array. The returned value may be of any Squirrel data type.

Example Code