Is it possible to break JavaScript Code into several lines?

Answer

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

Example:

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

Example:

The above code is perfectly fine, though not advisable as it hampers debugging.

All javascript Questions

Ask your interview questions on javascript

Write Your comment or Questions if you want the answers on javascript from javascript Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---