Breaking within a string statement can be done by using a backslash, ‘\,’ at the end of the first line.

Example:

document. Write ("This is \a program,");

And if you change to a new line when not within a string statement, then javaScript ignores the break in the line.

Example:

var x=1, y=2,
z=
x+y;