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 JavaScript Basics Working with Strings Combine Strings and Template Literals Review

Angelica Islas
Angelica Islas
4,082 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!