PRO
Khushbu
asked

Expert
Abhay Jajodia answered
Template literals are another way to write strings in JavaScript using backticks instead of quotes. The helpful thing about them is that you can drop variables straight into the string without breaking it apart.
Hereās a full example so you can see it in action:
let name = "Hushbu";
let city = "Mumbai";
let message = `Hi ${name}, you live in ${city}. Nice to meet you!`;
console.log(message);
When you run it, youāll get:
Hi Hushbu, you live in Mumbai. Nice to meet you!
You can also make multi-line strings with template literals, which keeps things easy to read.
If anything here feels unclear or you want more examples, Iām here to help.
JS
This question was asked as part of the Learn JavaScript Basics course.






