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
201,932 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