Returns the last N items from an array or string

Parameters

array Array (required) - an array object

count Number (optional) [default = 1] - The number of items to return

Returns

Object

Examples

LAST([1, 2, 3])

// returns 3
LAST(['a', 'b', 'c'], 2)

// returns ["b","c"]
LAST('abc')

// returns "c"
LAST('abc', 2)

// returns ["b","c"]

Did this page help you?