What's wrong with this JavaScript code?
<pre><code>var allHTMLElements = document.body.getElementsByTagName("*");
for (var i = 0; i &lt; allHTMLElements.length; i++) {
    if (allHTMLElements[i].getAttribute("group") &amp;&amp; allHTMLElements[i].getAttribute("index")) continue;
    allHTMLElements[i].style.color = "red";
}
</code></pre>

<hr>

<pre><code>&lt;div group="myGroup"&gt;Hello&lt;/div&gt;
&lt;div&gt;Hello&lt;/div&gt;
&lt;div index="d534"&gt;Hello&lt;/div&gt;
</code></pre>

<p>All the divs turn red and the ones with group and index do not stay the default color. Only the middle should turn red but it doesn't.</p>
