<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/bonfire-mutations" rel="nofollow">http://www.freecodecamp.com/challenges/bonfire-mutations</a></p>
<p dir="auto">I haven't actually managed to write a correct solution yet, but my last attempt passed even though I know it doesn't work. My solution:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="function mutation(arr) {

var match = true;
var string = arr[0].toLowerCase();
var toCheck = arr[1].toLowerCase();

for(i=0; i&lt;toCheck.length; i++) {
    var matched = string.indexOf(toCheck[i]);
    if (matched == -1) {
      match = false;
    } else {
      match = true;
    }
}
arr = match;
return(arr);"><pre class="notranslate"><code class="notranslate">function mutation(arr) {

var match = true;
var string = arr[0].toLowerCase();
var toCheck = arr[1].toLowerCase();

for(i=0; i&lt;toCheck.length; i++) {
    var matched = string.indexOf(toCheck[i]);
    if (matched == -1) {
      match = false;
    } else {
      match = true;
    }
}
arr = match;
return(arr);
</code></pre></div>
<p dir="auto">}</p>
<p dir="auto">A test that could be added that will cause this to fail:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="expect(mutation(['floor', 'xfor'])).to.be.false;"><pre class="notranslate"><code class="notranslate">expect(mutation(['floor', 'xfor'])).to.be.false;
</code></pre></div>
<h1 dir="auto"></h1>
<p dir="auto"><a href="https://github.com/FreeCodeCamp/FreeCodeCamp/files/465219/Coding.Bug.docx">Coding Bug.docx</a><br>
Hi! After completing a few challenges, I think I encountered a bug.  I followed the instructions on changing text color, and the text turned red, so I think I wrote this correctly.  But the system won't send me to the next challenge, claiming I didn't do this right.  See code input and the system response below.  Can someone from CodeCamp admin fix this so I can continue funfun coding? Thanks!</p>
<p dir="auto">My Code:</p>
<h2 dir="auto">CatPhotoApp</h2>
<p dir="auto">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p dir="auto">Response:<br>
Your h2 element should be red.</p>