core3-utils

@wixc3/common on Github

Home > @wixc3/common > last

last() function

Picks the last element of an iterable

Signature:

export declare function last<T>(iterable: Nullable<Iterable<T>>): T | undefined;

Parameters

Parameter Type Description
iterable [Nullable](/core3-utils/common.nullable.html)<Iterable<T>>

Returns:

T | undefined

undefined for null/empty iterable