starry.last
v4.0.1
Published
Member of the starry suite—modular functions for iterable objects.
Maintainers
Readme
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 | undefinedReturns the last element of iterable.
Returns undefined if the iterable has no elements.
Parameters:
- iterable -
Iterable<T>
Returns: T | undefined
