The Dark Times
+ to group them together:
var my_string =
"This is the first line." +
"This is the second line." +
"This is the third line.";
As you can see, this method is a bit of a mess and is tough to read if you have long or complicated strings.
Multiline Strings with Template Literals
Template literals are strings delimited by adding a backquote, or backtick,
` character to the beginning and end of your string. With this new rule in place, you're now able to separate your string over multiple lines without the use of excess quotes:
var my_string = `
This is the first line.
This is the second line.
This is the third line.
There are no comments yet. Start the conversation!