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 trial

JavaScript Getting Started With ES2015 Using Template Literals Review Template Literals

Brian M
Brian M
2,018 Points

ES2015

for one of the Quiz questions, I answered

const name = "Dave"; let message = "Hello ${name}. How are you?" as a way of putting template literals into the variable.

Is there something I'm misssing? because the answer keeps saying its incorrect.

Thanks.

2 Answers

Katrina H
Katrina H
4,141 Points

Hi Brian,

Template literals use the back-ticks instead of double/single quotes. The expression/variable should be wrapped in curly braces ${expression} instead of parentheses.

Reference: MDN Template Literals