Skip to content

Latest commit

 

History

History
17 lines (10 loc) · 505 Bytes

what_are_template_literals.md

File metadata and controls

17 lines (10 loc) · 505 Bytes

What are template literals?

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