Loop with if and break statements
<p>Why this alert shows 9 but not 5 or another number?</p>

<pre><code>for (var i = 0; i &lt; 9; i+=2) 
{
   if (++i == 5) break;
   else continue;
}
alert( i++ );
</code></pre>