I am learning Swift and hacking around in a playground. I have the following Dictionary:
var person = [
"first": "John",
"last": "Smith",
"age": 21
]
I am using the following line to print output:
"Your first name is \(person["first"]) and you are \(person["age"]) years old."
With this code, I get the following output:
// -> "Your first name is Optional(John) and you are Optional(21) years old."
I expected to receive the following as output:
// -> "Your first name is John and you are 21 years old."
Where is the Optional coming from? Why doesn't this simply print the value at the specified key? What do I need to do to fix this?