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

Joseph Harlow
seal-mask
.a{fill-rule:evenodd;}techdegree
Joseph Harlow
Front End Web Development Techdegree Student 8,243 Points

Complete the code below to create a template literal: const headline = '<h1>A Literal Headline</h1>';

Please help. Can't seem to get this one.

Tim Oltman
Tim Oltman
7,730 Points

Template literals are created only with the "tick" or "prime" character that is located to the left of the number 1 on your keyboard (above tab). This is different than the single quote character you are using in your question above.

1 Answer

Steven Parker
Steven Parker
231,236 Points

As Tim observed, template literals are enclosed in accents ("backticks") instead of apostrophes:

` :point_left: these, not these :point_right: '

But it might be worth pointing out that a template literal is not needed in this example, as no tag, interpolation tokens or newlines exist here. A plain string would do just as well here in practical code (and would be more "best practice").