1 min read

Template Literals

Template literals are a new way of creating strings in JavaScript. They are enclosed in backticks (`) and can contain placeholders for variables.

const name = 'John';
const greeting = `Hello, ${name}!`;
console.log(greeting); // "Hello, John!"