Unfortunately, this is a little annoying as you cannot do this. You will need to do this as follows:
var str = [ "Hello, this is a \n" "multiline\n", " string." ].join("");
Or using a similar trick,
var str = [ "Hello, this ", " is a multiline ", "string separated by new lines ", " with each array index" ].join("\n");
Moncader
source share