Function uniqueRight

Returns a new array with all duplicate values removed starting from the end of the input array.

uniqueRight([1, 2, 3, 2, 1]); // [3, 2, 1]
  • Type Parameters

    • V

      The type of the elements in the source array.

    Parameters

    • Rest...a: [source: readonly V[]]

    Returns V[]

    A new array with all duplicate values removed starting from the end of the input array.