Hey guys…
I completed the task
"
function mutation(arr) {
// Problem One Make sure they are lowercase
let arr1 = arr[0];
let arr2 = arr[1];
// arr1.toLowerCase();
// arr2.toLowerCase();
console.log(arr1);
for(let i = 0; i< arr1.length;i++){
let tempLetter = arr2.charAt(i).toLowerCase()
console.log(tempLetter);
if(!arr1.toLowerCase().includes(tempLetter)){
return false;
}
}
return true;
}
mutation([“hello”, “Hello”])"
I found it odd that although I had made the words lower case before the for loop, they seem to revert to upper case when using charAt method. Why is that?