Function mutation

Function mutation
0.0 0

#1

lowerCaseArr[0] is returning as undefined and I am not sure why. Could somebody please explain where I am going wrong with this so far please?

Your code so far

function mutation(arr) {
  
  var lowerCaseArr = arr.join(' ').toLowerCase.split(' ');
  
  if (lowerCaseArr[0] == lowerCaseArr[1]) {
    return true;
  }
    else {
      return false;
    }
}

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

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36.

Link to the challenge:


#2

You are missing () on one of your functions in the first line of your code:

var lowerCaseArr = arr.join(' ').toLowerCase.split(' ');