<html>
<body>
<p>Note that write() does NOT add a new line after each statement:</p>
<pre>
<script>
document.write("Hello World!");
document.write("Have a nice day!");
</script>
</pre>
<p>Note that writeln() add a new line after each statement:</p>
<pre>
<script>
document.writeln("Hello World!");
document.writeln("Have a nice day!");
</script>
</pre>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_doc_writeln by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:02:17 GMT -->
</html>