On this page
Set
Prev: Map | Up: builtins | Next: String
Rel: Collections Guide, Prototype Chain & new Flow
Ref: MDN Web Docs โ Set
Tags: #public #web #javascript #builtins #set #index
Overview
Insertion-ordered collection of unique values with $O(1)$ membership testing and ES2025 set algebra.
Core (#tier/core)
- Set.add โ Inserts
valueif not already present and returnssetfor chaining.
Standard (#tier/standard)
- Set.union โ Returns a new
Setcombining elements of both sets without mutating either (ES2025).
Linked from
Related notes
- tuts/javascript/builtins Linked here; links to this page; shared tags: #builtins, #index, #javascript, #web
- tuts/javascript/builtins/Map Linked here; links to this page; shared tags: #builtins, #index, #javascript, #web
- tuts/javascript/builtins/Set/add Linked here; links to this page; shared tags: #builtins, #javascript, #set, #web
- tuts/javascript/builtins/Set/union Linked here; links to this page; shared tags: #builtins, #javascript, #set, #web
- tuts/javascript/builtins/String Linked here; links to this page; shared tags: #builtins, #index, #javascript, #web
- tuts/javascript/builtins/collections_map_set_weak Linked here; shared tags: #builtins, #javascript, #web
- tuts/javascript/builtins/Map/groupBy links to this page; shared tags: #builtins, #javascript, #web
- tuts/javascript/tutorials/prototype_chain_and_new_flow Linked here; shared tags: #javascript, #web
- tuts/javascript/builtins/Array shared tags: #builtins, #index, #javascript, #web
- tuts/javascript/builtins/Global shared tags: #builtins, #index, #javascript, #web