Swift: working with dictionaries?

Example:

var dict: [String: Int] = ["apple": 5, "banana": 8]
Dictionaries are collections of key-value pairs in Swift.

Solution:

dict["cherry"] = 10

Beginner's Guide to Swift