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

Please...Help me to fill this

Here is the question "Complete the code below to create a template literal"

2 Answers

Steven Parker
Steven Parker
231,007 Points

Take a look at the hints and generic example I provided in your other question.

In Javascript to do string interpolation you have to use backticks for opening and closing the sting. When including variables inside one of these string you have to format it like this ${variable}, so in the case of that question, it would look like this :

let message = `Hello ${name}. How are you?`

If you want to look into a bit more, this is the MDN page on template literals