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 trialRobert Gunn
1,741 Pointsam I not understanding the question correctly
help
let currencies = ["US": "Dollar", "UK": "Pound", "JP": "Yen"]
let ukCurrency = ["UK": "Pound"]
2 Answers
krilnon
1,458 PointsThe task is to retrieve a value from the existing Dictionary (which you created in the previous step) using the key "UK". Right now, you're making a new Dictionary, not reading a value via a key from the existing Dictionary.
In the end, ukCurrency
will hold the string "Pound"
.
Ryan Ferguson
4,786 PointsGracias!
Ryan Ferguson
4,786 PointsRyan Ferguson
4,786 PointsI've got this and it's not working for me. Not sure why, exactly. Any help would be much appreciated.
krilnon
1,458 Pointskrilnon
1,458 PointsThey really just want
let ukCurrency = currencies["UK"]
.Instead of removing the value given the key, they want you to retrieve it, which is done using the special syntax I used above.
Robert Gunn
1,741 PointsRobert Gunn
1,741 PointsSimply the task was to capture the value of the key "UK". Thank you for the enlightenment. I sometimes make things more complicated than what they should be. Thanks again!!!