title: Do loops check the array.length every time when comparing i against array.length?
body: <p>I was browsing around and I <a href="http://net.tutsplus.com/tutorials/javascript-ajax/24-javascript-best-practices-for-beginners/" rel="noreferrer">found this</a>:</p>
  
  <pre><code>var i, len;
  for(i = 0, len = array.length; i &lt; len; i++) {  
     //...
  }
  </code></pre>
  
  <p>My first thoughts are:</p>
  
  <ul>
  <li>Why he did that? (it must be better for some reason)</li>
  <li>Is it worth it? (I assume yes, why else he will do it this way?)</li>
  </ul>
  
  <p>Do normal loops (the ones that don't cache the length) check the <code>array.length</code> each time?</p>