1 Answer

0 votes
by

In ES5, you would have to use newline escape characters('\n') and concatenation symbols(+) in order to get multi-line strings.

console.log("This is string sentence 1\n" + "This is string sentence 2");

Whereas in ES6, You don't need to mention any newline sequence character,

console.log(`This is string sentence
'This is string sentence 2`);
...