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! While you're at it, check out some resources Treehouse students have shared here.
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 trialMarco Leo
1,007 PointsWhere did i go wrong on creating a dictionary? Thanks,
var currencies = ["US": "Dollar", "UK": "Pound", "JP": "Yen"]
2 Answers
landonferrier
25,097 PointsMarco, after reading the instructions for the code challenge, it seems that you accidentally set your dictionary to a variable instead of a constant.
Here is the following code to pass the challenge:
let currencies = ["US":"Dollar", "UK":"Pound", "JP":"Yen"]
If you have any questions, feel free to ask!
Oliver Pinchbeck
2,732 PointsI'd go with:
let currencies = ["US": "Dollar", "UK": "Pound", "JP": "Yen"]
Think you just needed a constant instead of a variable.
Oli