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 trialMarc Christiansen
1,744 PointsHow to solve this??
This are 2 codes of all the plenty solutions I have given this irritating task.. What does it want?
Convert the set of concatenated strings assigned to the drink variable to a template literal. The final string should be "Blueberry Smoothie: $4.99".
const flavor = "Blueberry";
const type = "Smoothie";
const price = 4.99;
const drink = `´´${flavor} ${type}: $${price}´´.`
const flavor = "Blueberry";
const type = "Smoothie";
const price = 4.99;
const drink = `´´${flavor + ' ' + type }: $${price}´´.`
Marc Christiansen
1,744 PointsThanks for trying, didn´t solve it either though
Marc Christiansen
1,744 PointsThank you so much. But why if i may ask. I`m coding my soultions in VS code, and it gives me no error when i don´t put the ; ? I thought it was optional?
Roxanne Reyes
9,006 PointsActually the semicolon ; is used to end the statement, so it's a good practice to use it always. Some programmers omit the semicolon, but you find when you are programming in other languages, such as Java or C# it's required. It's good to be consistent, otherwise you may run into errors in the future.
Marc Christiansen
1,744 PointsOkay I see. again thank you so much for your help. i will for sure not forget to put the ; after this challenge :)
Roxanne Reyes
9,006 PointsI hope the answer worked for the challenge and you got it right this time. Good luck!
1 Answer
Roxanne Reyes
9,006 PointsDon't forget the back ticks ${flavor} ${type}: $${price}
;
It worked for me.
Roxanne Reyes
9,006 PointsRoxanne Reyes
9,006 PointsHi Marc! Try this answer
${flavor} ${type}: $ ${price}