unique
To return an array with unique elements
Filter out duplicates from one or more arrays to get an array with only unique values. This can be helpful to make sure there are no double entries in your array.
Syntax
unique([any], [any], ...)
Return
[any]
Examples
Result: D,C,A,B
Result: A,B,C,D,E,F
Result: Returns Yes (true
) if my list has no duplicates.
See also
rsort
, which sorts an array in descending order.
sort
, which sorts an array in ascending order.
Last updated