title: Colon within a Javascript function while loop
body: <p>I was poking around some HTML5 Javascript demos and came across something I've never seen before in the syntax. Take a look at the run function and notice how the <strong>search</strong> object notation is made in the <strong>while loop</strong>. Lines of interest include 15 and 18. Can anyone explain this syntax?</p>
  
  <pre><code>function run() {
    var n = 1;
    search: while (running) {
      n += 1;
      for (var i = 2; i &lt;= Math.sqrt(n); i += 1)
        if (n % i == 0)
         continue search;
      // found a prime!
      postMessage(n);
    }
  }
  </code></pre>
  
  <p>(code taken from here; <a href="http://html5demos.com/js/cruncher.js" rel="nofollow">http://html5demos.com/js/cruncher.js</a>)</p>