Mutations Free Code Camp Challenge

Tell us what’s happening:

Your code so far

function mutation(arr) {
  var string1 = arr[0].toLowerCase().split('');
  var string2 = arr[1].toLowerCase().split('');
  for(i=0; i<string1.length; i++){
    if(string1.indexOf(string2[i]) !== -1){
        return true;
       }
     return false;
  }
  
}

mutation(["hello", "hey"]);

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36.

Link to the challenge:

Yeah. Every condition except the first passes. Why?

Thanks! I figured it out with your help!

Why are we setting string1.indexOf(string2[i]) !== -1? This doesn’t make sense to me and yet I know it’s probably the key to why I can’t figure this thing out. What concept am I missing here?