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 trialDonny Gumelar France
Courses Plus Student 1,148 Pointshelp ! i get Bummer in this case .
on challenge task 2 of 2 when 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.
what's wrong on my code , when i press preview it don't show any error
struct ChocolateBox {
var title: String = "caramelDelight"
var flavor: String = "caramel"
}
1 Answer
Caleb Kleveter
Treehouse Moderator 37,862 PointsHey Donny,
In case you haven't figured this challenge out yet, this is the answer:
struct ChocolateBox{
let caramelDelight = [ "flavor" : "caramel" ];
}
The instructions are not vary clear, but all the challenge wants you to do is create a constant dictionary:
"Create a stored property named caramelDelight."
With the key 'flavor', and the value 'caramel':
To this dictionary add a key named flavor that stores a value named caramel to the caramelDelight dictionary to initialize it.
Donny Gumelar France
Courses Plus Student 1,148 PointsDonny Gumelar France
Courses Plus Student 1,148 PointsTHX ! u really help me out :D