title: TypeError: $(...)[1].attr is not a function
body: <p>I have links set up like so:</p>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;a href="www.example1.com" class="some-link"&gt;
  &lt;a href="www.example2.com" class="some-link"&gt;
  &lt;a href="www.example3.com" class="some-link"&gt;
  &lt;a href="www.example4.com" class="some-link"&gt;
  </code></pre>
  
  <p>I want to get the <code>href</code>s that the <code>&lt;a&gt;</code> tags contain. I tried to iterate through each link like so:</p>
  
  <p><strong>Javascript / jQuery:</strong></p>
  
  <pre><code>for (x=0; x &lt; 5; x++) {
    link = $(".some-link")[x].attr("href");
    console.log(link);
  }
  </code></pre>
  
  <p>When I try this, I get the error <code>TypeError: $(...)[x].attr is not a function</code>. What's the issue? Thanks.</p>