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 trialmatt tripodi
2,673 Pointshelp with challenge
We need to add the first chocolate to our box. Create a stored property named caramelDelight. To this dictionary add a key named flavor that stores a value named caramel to the caramelDelight dictionary to initialize it.
How would this challenge be answered?
struct ChocolateBox {
}
3 Answers
agreatdaytocode
24,757 PointsSure:
var caramelDelight = ["flavor": "caramel"] // Add this to the struct
struct ChocolateBox {
}
agreatdaytocode
24,757 PointsMatt,
You have it correct: Make sure you don't have any extra spaces after your answer.
struct ChocolateBox {
}
matt tripodi
2,673 Pointscould you help me with the second part of this challenge?
AR Ehsan
7,912 PointsHope that helps!
var caramelDelight = ["flavor": "caramel"]
matt tripodi
2,673 Pointsmatt tripodi
2,673 Pointsthank you
agreatdaytocode
24,757 Pointsagreatdaytocode
24,757 PointsGlad to help!