On the web, you might see examples without semicolons. Ending statements with semicolon is not required, but highly recommended.

For best readability, programmers often like to avoid code lines longer than 80 characters. If a JavaScript statement does not fit on one line, the best place to break it, is after an operator:

document.getElementById("demo").innerHTML =
"Hello Dolly!";

You can also break up a code line within a text string with a single backslash:

document.getElementById("demo").innerHTML ="Hello \
Dolly!";

The \ method is not the preferred method. It might not have universal support. Some browsers do not allow spaces behind the \ character.

A safer way to break up a string, is to use string addition:

document.getElementById("demo").innerHTML ="Hello" +
"Dolly!";

Yonggoo Noh

I am interested in Computer science and Mathematics.