by ampdepolymerase · 5y ago · 0 comments
As an aside, there is an alternative: passing a default value. This is Swift syntax:
let favoriteIceCream = [
"Paul": "Chocolate",
"Sophie": "Vanilla"
]
let result = favoriteIceCream["Charlotte", default: "Unknown"]