- Map — key → value pairs, like a more powerful plain object
- Set — a collection of unique values, no duplicates allowed
- Both preserve insertion order and have a .size property (not .length)
- Both support any value type as elements/keys, including objects
Map vs Set — Differences
Map stores key-value pairs; Set stores only unique values, with no keys.