Outputting Text with JavaScript

The output above was produced by the code below:

<SCRIPT>

// we escape " (\") so that it will literally write out " to the page
document.
write("This is where we say \"welcome\" to all our friends.<BR>");
// we didn't need to escape " this time because we are using single quotes (')
document.
write('This is where we say "welcome" to all our friends.<BR>');
document.
writeln("<PRE>document.writeln() works within the the &lt;PRE&gt; tags.</PRE>");
document.
write("<PRE>document.write() with \\n works within the &lt;PRE&gt; tags.\n</PRE>");
document.
write("document.write() with \\n does not works outside the &lt;PRE&gt; tags.\n");
document.
write("A backslash: \\");

</SCRIPT>