5 hands-on exercises and 5 find-the-bug challenges for the JavaScript Template Literals lesson. Every one is checked automatically in the browser — write the code, run it, and the tests tell you what still fails.
Use a template literal to greet the name.
Show the price with twenty percent added.
Choose the singular or plural wording.
Report how many lines a two-line template holds.
Report a name and an age in one sentence.
A placeholder only works inside backticks.
A placeholder needs a dollar before the braces.
Ready to write the code?
The editor, the automatic checks and the worked solutions open up with an account.
Open the workspaceThe calculation should happen inside the placeholder.
Rewrite the plus signs as a template literal.
A real line break works directly inside backticks.