Tell us what’s happening:
i don’t know what to do
function mutation(arr){
const firstElement = arr[0];
const secondElement = arr[1];
for (let char of firstElement){
if (firstElement == secondElement){
return true;
} else {
return false;
}
}
}
Your code so far
function mutation(arr){
const firstElement = arr[0];
const secondElement = arr[1];
for (let char of firstElement){
if (firstElement == secondElement){
return true;
} else {
return false;
}
}
}
console.log(mutation(["mary", "army"]))
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:143.0) Gecko/20100101 Firefox/143.0
Challenge Information:
Implement the Mutations Algorithm - Implement the Mutations Algorithm