Returns a new array with unique values from the source array.
unique([1, 2, 3, 2, 1]) // [1, 2, 3] Copy
unique([1, 2, 3, 2, 1]) // [1, 2, 3]
The type of the elements in the source array.
The source array.
A new array with unique values.
Returns a new array with unique values from the source array.
Example