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?
Mutations Challenge. Mary and Aarmy
arr.toLowerCase(); doesn’t convert arr 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"