Template Strings in Javascript ES6
To show you template string in Javascript ES6, we continue directly from last tutorial but with one line changed…
The result is the same. Instead of using the single of double quotes to mark the start and end of a string, we use the back-tick. This enables us to use interpolation variables inside the string denoted by dollar sign and curly braces as we did for ${name} and ${sum}.
In fact, you can even put some simple Javascript operations or method calls inside the curly braces as in here where we called toUpperCase() method…
And look, the template string can be broken into multiple lines — here it spans three lines. You could not do this with regular strings.