Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

John Smith
2,184 Pointscannot pass 2nd part of question because dictionary is immutable
i can't pass the second part and the error is something about it being immutable. let ukCurrency = currencies.removeValueForKey("UK") thats my second part of the code and i can't create this constant because of currencies already being a constant. it won't let me remove the value since it is a constant. help please?
2 Answers

Damien Watson
27,419 PointsOnce you have defined the currency then you can create a constant from it:
let currencies = ["US":"Dollar", "UK":"Pound", "JP":"Yen"];
let ukCurrency = currencies["UK"];

John Smith
2,184 PointsThanks a lot brotha i was lost

Damien Watson
27,419 PointsNo problems, glad to help.