Why is for(;;){…} an infinite loop?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/4740979/empty-for-loop-for">Empty for loop - for(;;)</a>  </p>
</blockquote>



<p>I just found a strange construct in the JS parser of UglifyJS (at <a href="https://github.com/mishoo/UglifyJS/blob/master/lib/parse-js.js#L1045" rel="nofollow">L1045</a>): <code>for(;;){…}</code>.</p>

<p>I assumed that an empty condition would resolve to <code>undefined</code>, which is converted to the boolean value <code>false</code>. But that's definitely not the case.</p>

<p>Apparently, it triggers an infinite loop. I was able to reproduce this behavior, but I have no clue why. Any (logical) explanations?</p>

<p>Besides: When this is possible, why doesn't <code>while(){…}</code> work?</p>
