Unlike regular strings that use a single/double quote as a delimiter, template-literal strings are delimited by the backtick (
Template literals have many features like variable interpolation, tagged templates, to name a few, but most importantly, they can be multi-line.
const multiStr = `
How are you?
Before ES6, you have to manually append a newline character (
\n) to create a multi-line string:
var multiStr = 'This is \n\
an example of \n\
Note that the backslash (
\) placed after the newline character (