JavaScript - 4

JavaScript - 4: Template Literals

Use template literals (backticks) to create a message that includes variables. Print it with console.log().

✦ JavaScript Editor
▶ Live Output

👀 Show Solution
let name = "Emma";
let age = 28;
let city = "New York";

console.log(\`Hello, my name is \${name}. I am \${age} years old and I live in \${city}.\`);