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 trialDan Loyer
46 PointsCreate a constant named favoriteDessert and assign to it a string containing your favorite dessert. Remember the syntax
Create a constant named favoriteDessert and assign to it a string containing your favorite dessert. Remember the syntax for a string is some text enclosed with two double quotes. Pro Tip: Dessert is spelled with two s'
below is my code? getting errrors?
// Enter your code below
var Favoritedessert = "chocolatecake" let Favoritedessert = "chocolatecake"
// Enter your code below
var Favoritedessert = "chocolatecake"
let Favoritedessert = "chocolatecake"
2 Answers
Jason Anders
Treehouse Moderator 145,860 PointsHey Dan,
You seem to have a couple of things going on here.
- First, you have both a variable and a constant declared, but the challenge is only asking for a constant.
- Second, you have named it
FavoriteDessert
with an upper-cased "F". The challenge specifically calls for a lower-case "f" because of the naming conventions in Swift.
Challenges are very picky and very strict. If you change, add, delete, etc anything that is not specified in the task instructions, it will return the Bummer! message.
Keep Coding! :)
Ary de Oliveira
28,298 PointsChallenge Task 1 of 1
Create a constant named favoriteDessert and assign to it a string containing your favorite dessert. Remember the syntax for a string is some text enclosed with two double quotes. Pro Tip: Dessert is spelled with two s'
let favoriteDessert = "Batata Doce"