JS Sets
A Set stores unique values. It is useful when duplicates have no meaning for the task.
Where to run this
This example uses the JavaScript console playground. Select Run to execute it; the example does not run on this lesson page.
A practical example
const names = new Set(["Mira", "Jon", "Mira"]);
console.log(names.size);
console.log([...names]);
What happens
There are two distinct names.