What is this: main:for(...){...} doing?
<p>I pulled up the <a href="http://code.google.com/p/nwevents/source/browse/trunk/nwmatcher-1.1.1.js" rel="nofollow">NWmatcher source code</a> for some light morning reading and noticed this odd bit of code I'd never seen in javascript before:</p>

<pre><code>main:for(/*irrelevant loop stuff*/){/*...*/}
</code></pre>

<p>This snippet can be found in the <code>compileGroup</code> method on line 441 (nwmatcher-1.1.1)</p>

<pre><code>return new Function('c,s,d,h',
    'var k,e,r,n,C,N,T,X=0,x=0;main:for(k=0,r=[];e=N=c[k];k++){' + 
         SKIP_COMMENTS + source + 
    '}return r;'
);
</code></pre>

<p>Now I figured out what <code>main:</code> is doing on my own. If you have a loop within a loop and want to skip to the next iteration of the outer loop (without completing the inner OR the outer loop) you can execute <code>continue main</code>. Example:</p>

<pre><code>// This is obviously not the optimal way to find primes...
function getPrimes(max) {
    var primes = [2], //seed
        sqrt = Math.sqrt,
        i = 3, j, s;

    outer: for (; i &lt;= max; s = sqrt(i += 2)) {
        j = 3;
        while (j &lt;= s) {
            if (i % j === 0) {
                // if we get here j += 2 and primes.push(i) are
                // not executed for the current iteration of i
                continue outer;
            }
            j += 2;
        }
        primes.push(i);
    }
    return primes;
}
</code></pre>

<p><strong>What is this called?<br>
Are there any browsers that don't support it?<br>
Are there other uses for it other than <code>continue</code>?</strong></p>
