Open this page in the API Guide

ArrayEnumerable.last Method

Returns the last element of the sequence. If "predicate" is provided, returns the last element that satisfies that condition.
 

Parameters

predicate

Type: Function
A function to test each element for a condition, returning true or false.
Optional: True

Return Value


Type: Object
The last element of the sequence that satisfies the specified condition.