Sorry, I have few more questions, If you don’t mind.
Why in this Basic Code Solution: there are no “{” after if statement , it’s only after return false ? I mean I understand why… but I don’t understand How?
function mutation(arr) {
var test = arr[1].toLowerCase();
var target = arr[0].toLowerCase();
for (i=0;i<test.length;i++) {
if (target.indexOf(test[i]) === -1)
return false;
}
return true;
}
mutation(["mary", "army"]);
And I also saw your Advanced solution freeCodeCamp Algorithm Challenge Guide: Mutations
Looks like I have to learn a lot about RegExp I tried before MDN RegExp, but can’t learn a lot from it)). Can you tell me some kind of guide from where I can learn deep about RegExp?