Member of the starry suite—modular functions for iterable objects.
Status
Applies to the whole suite.
Usage
function last<T = any>(iterable: Iterable<T> = []) : T | undefined
Returns the last element of iterable.
Returns undefined
if the iterable has no elements.
Parameters:
- iterable -
Iterable<T>
Returns: T | undefined