JavaScript Array Looping
<p>So I've got this piece of code below:</p>

<pre><code>var divs = ["A", "B", "C"];
for (var i = 0, div; div = divs[i]; i++) {  
  print(div);
}
</code></pre>

<p>As I understand it, the for loop iterates through every element of the divs array and prints them.  I however fail to understand how the loop terminates.  Could somebody explain that to me?</p>
