• returns the last element of an array.

    Type Parameters

    • T

    Parameters

    • array: undefined | T[]

    Returns undefined | T

    undefined if not found