Is JavaScript Code can be broke down into several lines?

Posted by  Nishi Tiwari
 67  View(s)
Ratings:
Rate this:
  1. Is JavaScript Code can be broke down into several lines?

    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.

Answer