JavaScript will allow you to break a statement into two lines:
Example 1
var x =
"Hello World!";
"Hello World!";
But, breaking a statement in the middle of a string will not work:
Example 2
var x = "Hello
World!";
World!";
You must use a "backslash" if you must break a statement in a string:
Example 3
var x = "Hello \
World!";
World!";
Practice Excercise Practice now