Abotsi GodwinCourses Plus Student 1,400 Points
Somone should help me with a constant Quiz, right now.
It says to create a constant name favoriteDessert and assigned it to a strong favorite dessert.
// Enter your code below let = "favoriteDessert"
Andrew Kyu5,842 Points
Right now your constant doesn't have a name to it. What the question is asking you to do is name your constant 'favoriteDessert' and assigning your favorite dessert as its value. For example the correct syntax for this is:
let favoriteDessert = "Ice cream"
Jennifer NordellTreehouse Staff
Hi there! To create a constant you use the
let keyword, and that part you did just fine. The name of the constant should follow the the
let keyword. Then there should be an equals sign and on the right side of the equals sign should be the value that you want to assign to it.
This is how I did it:
let favoriteDessert = "chocolate cake"
Here I define a constant named
favoriteDessert and I assign the string "chocolate cake" to this constant. But you may, of course, assign your own string for your favorite dessert.
Hope this helps!