title: proper javascript for a while loop
body: <p>I would like to know proper code to add another condition to the while loop code below. Specifically where <strong>.id !='k2-label'</strong> I would like <strong>.id (!= 'k2-label' &amp;&amp; !=some-label)</strong> (<em>this is the PHP version of what I want to accomplish</em>), except I don't know javascript. The change is to be added to the following code:</p>
  
  <pre><code>while (next.getFirst().getNext().getFirst().id != 'k2-label') {
                          joomla_bits['titles'].push(next.getFirst().getFirst());
                          joomla_bits['items'].push(next.getFirst().getNext().getChildren());
                          next = next.getNext();
                      }
  </code></pre>
  
  <p>Thank you,</p>