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 2.0 Collections and Control Flow Dictionaries Working with Dictionaries

Sheng Wei
Sheng Wei
4,382 Points

[Help!] No idea what's wrong with my dictionary

I am being told to create a dictionary with the following key-value elements (I know, simple right?) Re-checking my work keeps on displaying: Make sure you display all the items in the question. Its annoying because it works in my Xcode compiler...any ideas? Thanks

This is my code:

var iceCream: [String: String] = [ "CC": "Chocoloate Chip", "AP": "Apple Pie", "PB": "Peanut Butter"

]

dictionary.swift
// Enter your code below
var iceCream: [String: String] = [
    "CC": "Chocoloate Chip",
    "AP": "Apple Pie",
    "PB": "Peanut Butter"

]

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! Challenges are picky and you've misspelled "Chocolate". You typed in "Chocoloate". Fix the spelling and you should be good to go! :thumbsup:

Sheng Wei
Sheng Wei
4,382 Points

Oh goodness, thank you Jennifer! Just curious, is there a notification that alerts all members/moderators about new member questions? You guys seem to be responding like lightning haha

Sheng Wei
Sheng Wei
4,382 Points

Haha alright cheers, people like you make the community awesome!