Template Literal Syntax
Multiple Choice Easy
Question
Which creates a string with an embedded expression in JavaScript?
Hint
Template literals use backticks and ${} for interpolation.
Explanation
Template literals use backticks () as delimiters and ${expression} for interpolation. So Hello ${name}` evaluates the name variable inside the string. Regular quotes do not interpolate ${}. Template literals also preserve multi-line strings without needing \n.
Related Resources
Related Lessons
- Strings and Text
Learn about strings.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.