title: Best method to get attributes from getElementsByTagName()?
body: <p>I'm playing around with getting attributes of a <code>link</code> tag, there seems to be several ways of accessing the attributes:</p>
  
  <pre><code>document.getElementsByTagName("link")[0]['media']
  document.getElementsByTagName("link")[0].media
  document.getElementsByTagName("link")[0].getAttribute('media')
  document.getElementsByTagName("link")[0].attributes['media']
  </code></pre>
  
  <p>It's bordering on ridiculous how many paths there are to the same data. Is one of these methods far superior to the rest?</p>