Dictionaries hold key-value pairs — like a mini-database where you lookup values using unique keys.
count
: Number of key-value pairs.keys
: Get all keys as a collection.values
: Get all values as a collection.removeValue(forKey:)
: Remove item by key.for (key, value) in dictionary
to loop through pairs.??
to safely unwrap values that might be missing.