title: Nested jQuery.each() - continue/break
body: <p>Consider the following code:</p>
  
  <pre><code>    var sentences = [
          'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
          'Vivamus aliquet nisl quis velit ornare tempor.',
          'Cras sit amet neque ante, eu ultrices est.',
          'Integer id lectus id nunc venenatis gravida nec eget dolor.',
          'Suspendisse imperdiet turpis ut justo ultricies a aliquet tortor ultrices.'
      ];
  
      var words = ['ipsum', 'amet', 'elit'];
  
      $(sentences).each(function() {
          var s = this;
          alert(s);
          $(words).each(function(i) {
              if (s.indexOf(this) &gt; -1)
              {
                  alert('found ' + this);
                  return false;
              }
          });
      });
  </code></pre>
  
  <p>The interesting part is the nested jQuery.each() loops. As per <a href="http://api.jquery.com/jQuery.each/" rel="noreferrer">the documentation</a>, returning false will break out of the loop (discontinuing execution of the loop - similar to a normal JavaScript break statement), and returning non-false will stop the current iteration and continue with the next iteration (similar to a normal JavaScript continue statement).</p>
  
  <p>I can break or continue a jQuery.each() on its own, but with nested jQuery.each, I've found it difficult to break out of the parent loop from within the child loop. I could use a boolean value, and update it on every child iteration, but I was wondering if there was an easier way.</p>
  
  <p>I've set up <a href="http://jsfiddle.net/nCyGL/" rel="noreferrer">an example at jsFiddle</a> if you'd like to mess around with it. Simply click the "Test" button to run the example shown above.</p>
  
  <p><strong>TLDR:</strong> Is there anything resembling a labeled continue or break within the context of jQuery?</p>