Set object
A built-in JavaScript collection of unique values.
In more detail
Adding a value that is already present has no effect. Like Map, a Set keeps its members alive; WeakSet is the version that does not.
Related terms
- WeakSet — A collection of objects held weakly, used to mark objects, such as elements already processed, without keeping them alive.
- Map (collection) — A built-in JavaScript collection of key-value pairs where keys can be any value, including objects, kept in insertion order.
Taught in
- Memory Management: Garbage Collection, Memory Leaks And WeakMap — Frontend Architecture & Web Platform
- Web Workers: Off-Thread Computation And Structured Clone — Frontend Architecture & Web Platform