javascript - What does "search" word/command in JS mean? -
i'm reading web workers http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#a-background-number-crunching-worker.
there code example word "search". mean? new command?
var n = 1; search: while (true) { n += 1; (var = 2; <= math.sqrt(n); += 1) if (n % == 0) continue search; // found prime! postmessage(n); }
this labelled continue. while
loop has search:
label, , continue
continue while loop. without label continue for
loop.
Comments
Post a Comment