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 trialNils Garland
18,416 Pointswhat am i doing wrong?
??
// Enter your code below
var iceCream = [
"CC": "Choclate Chip",
"AP": "Apple Pie",
"PB": "Peanut Butter"
]
12 Answers
Caleb Kleveter
Treehouse Moderator 37,862 PointsIt's like getting an item from an array, accept it is the kay, not the index:
let applePie = iceCream["AP"]
Caleb Kleveter
Treehouse Moderator 37,862 PointsiceCream.updateValue("Chocolate Chip Cookie Dough", forKey: "CC")
erik Jones Oniga
3,307 Pointsyou sure that's right? because that's not working
Caleb Kleveter
Treehouse Moderator 37,862 PointsThis is what I used to pass the first task:
var iceCream = [
"CC": "Chocolate Chip",
"AP": "Apple Pie",
"PB": "Peanut Butter"
]
Nils Garland
18,416 Pointsyes but the next task?
Nils Garland
18,416 Pointsyes but the next task?
Nils Garland
18,416 Pointsno i mean the third*
Nils Garland
18,416 Pointsno i mean the third*
Caleb Kleveter
Treehouse Moderator 37,862 PointsiceCream.updateValue("Rocky Road", forKey: "RR")
Nils Garland
18,416 Pointsand the last?
Nils Garland
18,416 PointsThanks i found tha last one out by my self but thanks for the help now i get it
Nils Garland
18,416 Pointsi asking you to be active to help me out more if i need it
Nils Garland
18,416 Pointsi gave you some best answer