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 trialKyle Donahoe
311 PointsI don't know how to solve these.
Not sure what I did wrong.
// Enter your code below
let language = "favDessert"
var str = "favDessert"
str = "Pie"
3 Answers
David Montalvo
6,937 PointsSorry but I don't get it... Please can you write the complete question so I can help you, because the challenge is asking for one task, but you are doing another one,
jcorum
71,830 PointsThe instructions are: "Create a constant named favDessert and assign to it a string containing your favorite dessert. "
let favDessert = "favDessert"
Here favDessert is the constant they asked you to create, and "favDessert" is the string containing your favorite dessert that is being assigned to it.
David Montalvo
6,937 PointsOk. your code is right, maybe try to change the "favDessert" to another one "IceCream" for example, so your code should be something like this:
let favDessert = "IceCream"
That works for me :)
jcorum
71,830 PointsSure. You had "favDesert" so I just stuck with it. It doesn't matter, as anything inside double-quotes is a String. The editor would have accepted "xyxyxy"