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 trial

iOS Swift Basics (retired) Collections What is a Dictionary?

I'm a bit stuck on the second task of this quiz. I could use a little help.

I've re-watch the video previous to this quiz and am still having trouble understanding what I'm supposed to say for the second task in this quiz.

Provide some code that you've tried, so we can see what you're doing wrong.

5 Answers

It wants you to assign the value at currencies["UK"] to a constant named ukCurrency; not assign currencies["UK"] to the value "ukCurrency". Meaning:

    let ukCurrency = currencies["UK"]

Not:

    let currencies["UK"] = "ukCurrency"

here's the question: Challenge task 2 of 2 Assign the value for key "UK" to a constant named ukCurrency.

here's what I've placed:

let currencies = ["US" : "Dollar", "UK" : "Pound", "JP" : "Yen" ] let currencies["UK"] = "ukCurrency"

It wants you to assign the value at currencies["UK"] to a constant named ukCurrency; not assign currencies["UK"] to the value "ukCurrency".

Could I have you rephrase that a bit? I'm having trouble following.

Thanks buddy! Totally makes sense now that I can see it!