Function toReversed

  • Creates a copy of the specified array of items with the items reversed.

    Type Parameters

    • T

      Type of item in the specified items array.

    Parameters

    • items: T[]

      Array of items to reverse order.

    Returns T[]

    Array of items with items reversed.

    Use the toReversed built-in method on arrays.