Back
Are there any other ways to insert the value of a variable into a string, apart from string concatenation?
You can use template literals like this:
const age = 3;console.log(`I'm ${age} years old!`);
const age = 3;
console.log(`I'm ${age} years old!`);
Want to be a full stack developer? Check out the full stack developer course from Intellipaat.
31k questions
32.8k answers
501 comments
693 users