Template Literals in JavaScript: Write Cleaner Strings Without the Mess
Why were template literals introduced?
Let’s start with a small problem.
Earlier in JavaScript, if you wanted to create a string with variables, you had to do this:
const name = "Adarsh";
const age =
templateliteralsinjavascriptwritecleanerstringswithoutthemess.hashnode.dev4 min read