January 2026
Get a Set of Unique Values from an Array
The Set object can be used to pull unique values from an array:
JavaScript
const items =
const uniqueItems = ;
const outputEl = document.
outputEl. = uniqueItems;
Output:
Since it's an array at that point you can add . to sort it.
Nice and easy,
-a
end of line