Objects/Maps/Dictionaries
Key-value storage for fast lookups.
Lesson 2
Concept
Dictionaries store values by key. Great for counting, grouping, and caches. Beware of missing keys and default values.
Try it
Match tasks to best structure
Unsorted
Counting word frequencies
Maintaining unique IDs
Preserving insertion order list
Fast membership check
Dictionary/Map
Set
Array/List