First attempt at generating prime numbers
First of all, there's a slight problem with your code. I get this output:

2, 3, 5, 5, 5, 7, 7, 7, 7, 7, 9


So it repeats quite a bit, and -- wait, 9 is not a prime number. Oops.

For, say, numbers up to 25, you'd get 21 instances of 23 in your array. And we'd get a 24 too, although that's not prime. We'll deal with that in a second. 

The way your code runs, you don't need the labels (primes_loop and divisors_loop); when you continue or break you do so for the "closest" loop you're in. So simply writing continue with no label will skip to the next iteration of the outer (prime) loop, and break will break the inner (divisor) loop.

However, a label might be handy for a revised version that actually does find primes and only primes (of course, there are other, smarter approaches to all of this, but I'm just sticking to the code that was posted):

var primes = [],
    limit = 10,
    n, divisor;

outerLoop: for( n = 2 ; n &lt;= limit ; n++ ) {
  for( divisor = 2 ; divisor &lt; n ; divisor++ ) {
    if( n % divisor === 0 ) {                     
      continue outerLoop; // not a prime, try the next n
    }
  }
  primes.push(n); // if we made it all the way here, then n is prime
}


After that, you'll be left with a primes array that looks like this:

[ 2, 3, 5, 7 ]


No repetition, and no false positives.

Of course, it'd be nicer to wrap as a function:

function findPrimes(limit) {
  var primes = [], n, divisor;

  outerLoop: for( n = 2 ; n &lt;= limit ; n++ ) {
    for( divisor = 2 ; divisor &lt; n ; divisor++ ) {
      if( n % divisor === 0 ) {
        continue outerLoop;
      }
    }
    primes.push(n);
  }

  return primes;
}