Enumerable.last Method

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

Parameters

source

Type: IEnumerable
The enumerable to return the last element of.
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.