title: Omitting Condition in For Loop
body: <p>Can someone please help me understand why the following code works:</p>
  
  <pre><code>var someNumbers = [1,2,3,4,5];
  var length = someNumbers.length;
  
  for(var i=length; i--;) {
    console.log(i);
  }
  </code></pre>
  
  <p>How does this for loop know to terminate once <code>i</code> equates to <code>0</code>? What about negative numbers? Wouldn't this cause an infinite loop?</p>