Template literals are a way to define strings that can contain expressions, making string interpolation easier. They are enclosed by backticks (
) instead of quotes.
Example:
let name = 'John';
let greeting = `Hello, ${name}!`;
console.log(greeting); // Output: Hello, John!
Tags: intermediate, JavaScript, Strings