The Document Object

The write() and writeln() Methods

write() does NOT add a new line (CR) after each statement.

writeln() DOES add a new line (CR) after each statement.

Hello World!Have a nice day!
Hello World! Have a nice day!

It makes no sense to use writeln() in HTML.

Carriage return (CR) is ignored in HTML.