Any risks in using " for (i = 0; elem = array[i]; i++) " for iterating over an array?
<p>Since I've discovered this snippet, I'm very often using it for iterating over arrays :</p>

<pre><code>for (i = 0; elem = array[i]; i++) doStuff(elem);
</code></pre>

<p>It is obviously very wrong if <code>array</code> can contain anything that evaluates to false (<code>''</code>, <code>undefined</code>, <code>null</code>, <code>0</code>, <code>false</code>). But if you're sure that this is not the case, does anybody see another risk of using this method ?</p>

<p>I am asking this, since it doesn't seem to be very commonly used, though it seems really great to me, so I started thinking that there was an obvious drawback I was missing.</p>
