printing elements with javascript
<p>I'm learning javascript at the moment and the code below isn't producing the results I thought it would:</p>

<pre><code>var links = document.getElementsByTagName("a");

for(i=0; i&lt;links.length; i++) {
    document.write(links[i]);
}
</code></pre>

<p>When I run this code, it writes 1 element from the array. I want it to return everything (there are over 1,000 in <code>links</code>)</p>

<p>What did I do wrong?</p>
