Returns the last element of an array

  • Type Parameters

    • T

    Parameters

    • xs: T[]

      The array

    • ...args: unknown[]

    Returns T

    Last element or undefined