Lambda saysSet stores unique values — adding a duplicate is a no-op.
A Set holds each value once. Add with add, check with has, count with .size. The fastest way to dedupe an array is [...new Set(arr)]. Sets are iterable and keep insertion order, making them great for membership tests and unique collections.
Power-ups you unlock
Set stores unique values only
add/has/delete; .size counts
Dedupe an array: [...new Set(arr)]
Iterable, insertion-ordered
The Mutator attacks — common mistakes
Expecting object values to dedupe (by reference)
Using an array + includes for big membership tests
Forgetting Set has no index access
Boss battleDedupe an array with duplicates using a Set.