Key-Value Data with Dict
Look up values by key.
Look Up by Key
When you want to find a value by a name instead of a position, use a Dict. It maps keys to values. 🔑
Two Types in Brackets
A Dict declares two types: the key type and the value type, like Dict[String, Int].
var ages = Dict[String, Int]()All lessons in this course
- Building and Growing a List
- Key-Value Data with Dict
- Unique Items with Set
- Choosing the Right Collection