Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Web Technology by (7k points)

Are there any other ways to insert the value of a variable into a string, apart from string concatenation?

1 Answer

0 votes
by (13.1k points)

You can use template literals like this:

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. 

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
0 answers

Browse Categories

...