Tell us what’s happening:
For solving this problem can I use if else condition and satisfy all the cases? Please tell me I need help.
Your code so far
function mutation(arr) {
var newArray=[];
for(var i=0;i<arr.length;i++)
{
newArray.push(arr[i].toLowerCase());
}
if(newArray[0].indexOf(newArray[1]))
{
return true;
}
else if(newArray[0]!==newArray[1])
{
return false;
}
}
mutation(["hello", "Hello"]);
Your browser information:
Your Browser User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36
.
Link to the challenge: