Using the stop in a loop with conditionals
<p>Hello there I'm finding it difficult to understand some basic JavaScript </p>

<p>I have written a loop that counts down from 10 to 0 and I'm using console.log to print that value to the console. Inside the loop an <code>if</code> statement is used to check if the number is 0, if it is then console.log prints "Blast Off!" instead of a number.</p>

<p>Here is my working code:</p>

<pre><code>for (i=10; i&gt;=0; i--;) 
{
if (i === 0)    
    {
    console.log("Blast Off!");
    }
else 
    {
    console.log(i);
    }
}
</code></pre>

<p>However what I'm desperately trying to understand the is the stop of the <code>for</code> loop which is:</p>

<pre><code>i&gt;=0;
</code></pre>

<p>Is this effectively saying if <code>i</code> is greater than or equal to zero then progress through the loop decrementing <code>i</code> each time, then stop when zero is reached?</p>

<p>Conversely when I change the <code>for</code> loop code to what is shown below, is this effectively saying if <code>i</code> is less than or equal to zero then progress through the loop decrementing <code>i</code> each time until zero is reached? </p>

<p>What is the reason for the loop not printing, if the stop is changed? Is this because <code>i</code> <strong>never</strong> holds a value that is less than or equal to zero, meaning the loop will not run?</p>

<pre><code> i&lt;=0;
</code></pre>

<p>Any help clearing this up for me would be appreciated massively.</p>
