Mutations Challenge. Mary and Aarmy

Mutations Challenge. Mary and Aarmy
0

#1

I’m having trouble trying to figure out why my code is able to pass each example except for [“Mary”, “Aarmy”] and [“Mary”, “Army”]. I don’t see a reason why it doesn’t from the code but maybe I’m missing something. Could somebody assist with this code?


#2

arr[0].toLowerCase(); doesn’t convert arr[0] to lowercase in place- you need to save it to a variable to hold that new string value.

Example if you want to check this in your console:

var test = 'HeLLo';
test.toLowerCase() // will show "hello"
test // will show "HeLLo"