JavaScript JavaScript Basics Working with Strings Combine Strings and Template Literals Review

Angelica Islas
Angelica Islas
1,201 Points

How do I fill in this challenge? const headline = <h1>A Literal Headline</h1>;

Not sure what is supposed to go before and after the html markers

1 Answer

Hi Angelica!

They are asking you to make a string using template literal syntax.

Template literals need to be surrounded by backticks and usually contain variables inside ${ } like this:

${variable}

This challenge just omits the variables and the full string would be:

const headline = `<h1>A Literal Headline</h1>`;

More info:

https://css-tricks.com/template-literals/

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals

https://www.youtube.com/watch?v=NgF9-pdTDGs

https://www.youtube.com/watch?v=kj8HU-_P2NU

I hope that helps.

Stay safe and happy coding!