Is it possible to break JavaScript Code into several lines?
0
Breaking within a string statement can be done by the use of 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;
The above code is perfectly fine, though not advisable as it hampers debugging
Sign in to add a comment
0 Answers
0
📝 No answers yet!
Be the first to answer this interview question.
Your Answer
Sign in to post your answer and help the community.