Javascript newbie: why is the value not printed out?
<p>I am just starting learning JavaScript, and have a question that I am not able to understand.</p>

<p>I have an HTML file like this:</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
    &lt;script language="javascript" src="test.js" /&gt;
    &lt;!-- &lt;script&gt;&lt;/script&gt; --&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>and my test.js is like this:</p>

<pre><code>document.writeln("test");
</code></pre>

<p>Strangely enough, I do not see the string "test" printed out on the web page. It doesn't print until I remove the commented out line of code in the HTML file.</p>

<p>Also, when I try to replace <code>&lt;script&gt;&lt;/script&gt;</code> with <code>&lt;script/&gt;</code>, there is no output either.</p>

<p>The question here is why the code <code>&lt;script&gt;&lt;/script&gt;</code> is related to the output?</p>

<p>Test was done on Chrome 10, and IE 9. </p>
