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 trialMichael Dussie
1,891 PointsWe've learned that while people like our chocolate chip flavor, they like it even better when it has cookie dough in it
We've learned that while people like our chocolate chip flavor, they like it even better when it has cookie dough in it as well.
Let's update the value for the key "CC", to be "Chocolate Chip Cookie Dough".
3 Answers
Evan Demaris
64,262 PointsHi Michael,
If you post the code you've tried so far, it can help us see the cause of the specific error you're experiencing with the Challenge. There's generally going to be more than one way to solve a Challenge, and the way you're trying could just have a typo in it; however, the most efficient way to update the value of "CC" would probably be to use the following code.
iceCream["CC"] = "Chocolate Chip Cookie Dough"
rohitdevnani
iOS Development Techdegree Student 14,882 PointsiceCream.updateValue("Chocolate Chip Cookie Dough", forKey: "CC")
Kellington Chidza
866 PointsiceCream["CC"] = "Chocolate Chip Cookie Dough"
Michael Dussie
1,891 PointsMichael Dussie
1,891 PointsThanks Evan, I had the answer, I was just trying to post it for someone else, I just forgot to post the code.