title: Add class to first child using javascript
body: <p>is there any reason this chain does not work? It does not add the class:</p>
  
  <pre><code>document.getElementsByTagName('nav')[0].firstChild.className = "current"
  </code></pre>
  
  <p>It should return the first child of the nav element which is an <code>&lt;a&gt;</code> which does not happen.</p>
  
  <p>Thanks for your help!</p>