Within a string statement breaking can be done by the use of a backslash, '\\', at the end of the first line For example: document.write("This is \\a program"); If we change to a new line when not within a string statement, then javaScript ignores break in the line. For example: var x=1, y=2, z= x+y; The above code is perfectly good, but it is not advisable as it hampers debugging.
Within a string statement breaking can be done by the use of a backslash, '\', at the end of the first line
For example:
document.write("This is \a program");
If we change to a new line when not within a string statement, then javaScript ignores break in the line.
For example:
var x=1, y=2,
z=
x+y;
The above code is perfectly good, but it is not advisable as it hampers debugging.