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?

Mitihun Vijayasekar
Mitihun Vijayasekar
2,243 Points

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

Not sure what is wrong here.

dictionaries.swift
var currencies = ["US": "Dollar", "UK": "Pound", "JP": "Yen"]

2 Answers

Jack Hayton
Jack Hayton
2,012 Points

Add more information to this question. Im assuming this is from one of the tasks in Amit's courses on Swift basics. Based on what you have posted I cannot see a problem, try posting your entire code. If you forget to add a "{" or "}" to start/end parts of your code or make other unrelated problems you will still not pass the task. Perhaps you have made a mistake elsewhere in the code?

Ricardo Gonzalez
Ricardo Gonzalez
2,286 Points

The challenge is actually asking for a constant and not variable.