title: Continue 2 levels deep in JS
body: <p>Consider this very simple code:</p>
  
  <pre><code>someLabel:
  for (var i=0; i&lt;newFonts.length; i++) {
      var newFont = newFonts[i];
  
      for (var j=0; j&lt;oldFonts.length; j++) {
          var oldFont = oldFonts[j];
  
          if (fb.equals(oldFont, newFont)) {
              // Break out of inner loop, don't finish outer iteration, continue with next outer item
              continue 2;
          }
      }
  
      // This must only happen if `newFont` doesn't match ANY `oldFonts`
      oldFonts.push(newFont);
  }
  </code></pre>
  
  <p>What it's <strong>supposed</strong> to do is compare all <code>oldFonts</code> <strong>objects</strong> with <code>newFonts</code> <strong>objects</strong> and only add <code>newFont</code> to <code>oldFonts</code> (<code>oldFonts.push</code>) if it doesn't already exist (<code>fb.equals</code>).</p>
  
  <p><code>oldFonts</code> and <code>newFonts</code> are objects with <code>name</code> and <code>host</code> properties. Both are used in <code>fb.equals()</code> to determine equality. <code>indexOf()</code> won't work.</p>
  
  <p>This is exactly how I'd do it in PHP. It doesn't work in JS, because JS doesn't support <code>continue 2</code>, which means continue 2 levels.</p>
  
  <p>How do I do this in JS??</p>
  
  <ul>
  <li><code>continue</code> wont do, because it'll still finish the inner loop and end up at the <code>push</code></li>
  <li><code>break</code> won't do, because it'll skip the inner loop and jump straight to the <code>push</code></li>
  <li><code>break someLabel</code> won't do, because I don't want to skip ALL <code>newFonts</code> when ONE must be ignored</li>
  </ul>
  
  <p>This must be possible without a single function...</p>