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?

what defined let ukCurrency mean?

it wont wok id don't understand what this means

dictionaries.swift
let currencies = ["US": "Dollar", "UK": "ukCurrency", "JP": "Yen"]

1 Answer

Chris Shaw
Chris Shaw
26,676 Points

Hi haydensteed,

The second task is simply asking for you to get and assign the value of UK to a new constant called ukCurrency which we can do by using the following code.

let ukCurrency = currencies["UK"]

If this is at all confusing I recommend you go back and watch the previous video as Amit does show has you can access values for a given key.

https://teamtreehouse.com/library/swift-basics/collections/what-is-a-dictionary

Happy coding!

thaaaaank you! i was working on this for hours!!!!!!!!!!!!