Skip to main content
JavaScript Output Prediction Easy +10 XP

Template Literals

What is the output?

JavaScriptRead-only
const name = "World";
console.log(`Hello ${name}!`);

What is the output?

Show answer and explanation

Answer: Hello World!

Template literals (backticks) allow embedded expressions with ${...}. The variable name is substituted.

Hint: Backticks enable string interpolation.

What this challenge tests

Output Prediction in JavaScript: template-literals, strings.

Related challenges