title: How to loop through selected elements with document.querySelectorAll
body: <p>I am trying loop on selected elements that queried with document.querySelectorAll, but how?</p>
  
  <p>For example I use:</p>
  
  <pre><code>var checkboxes = document.querySelectorAll('.check');
  for( i in checkboxes) {
    console.log(checkboxes[i]);
  }
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>&lt;input id="check-1" class="check" type="checkbox" name="check"&gt;
  &lt;input id="check-2" class="check" type="checkbox" name="check"&gt;
  &lt;input id="check-3" class="check" type="checkbox" name="check"&gt;
  &lt;input id="check-4" class="check" type="checkbox" name="check"&gt;
  &lt;input id="check-5" class="check" type="checkbox" name="check"&gt;
  &lt;input id="check-6" class="check" type="checkbox" name="check"&gt;
  &lt;input id="check-7" class="check" type="checkbox" name="check"&gt;
  &lt;input id="check-8" class="check" type="checkbox" name="check"&gt;
  &lt;input id="check-9" class="check" type="checkbox" name="check"&gt;
  &lt;input id="check-10" class="check" type="checkbox" name="check" checked=""&gt;
  
  10
  item()
  namedItem()
  </code></pre>
  
  <p>My problem is that at the end this method returns 3 extra items. How can I properly do it?</p>