Welcome to the Treehouse Community
Looking to learn something new?
note: change 'let' to 'var' to make it mutable
Should this really work?
I'm trying it in a playground too and it is complaining that I have the constant currencies while trying to assign constant ukcurrency a value.
The error in playground is:
"note: change 'let' to 'var' to make it mutable"
On tem treehouse, is complains that code cannot be compiled but doesn't make sense to me when I check the errors.
let currencies = ["US": "Dollar", "UK": "Pound", "JP": "Yen"] let ukCurrency = currencies.removeValueForKey("UK")
I agree with you Kieran but that doesn't seem to be the case here. Your code also gets rejected because it wants to have dict as constant.
The question is :
"Create a constant named ukCurrency. Assign the value from the currencies dictionary. Use the key of "UK" to access the value."
But the previous questions was: "Let's create a dictionary that contains the currencies of the various countries along with their country codes. The country code will be the key and the currency the value. Using the following key-value pairs: US : Dollar, UK : Pound, JP : Yen assign them to a constant named currencies."
I don't believe I can work past this?