ichigyou
    Preparing search index...

    Function lastNElements

    • Returns the last 'n' elements from the given array.

      Type Parameters

      • T

      Parameters

      • arr: T[]

        The array from which to extract elements.

      • n: number

        The number of elements to extract from the end of the array.

      Returns T[]

      A new array containing the last 'n' elements from the input array.