I’m currently doing the Mutations challenge and I managed to pass all the tests but the first one.
I divived the initial array in two array of characters as suggested by the wiki as well.
Then i proceded to check if every single letter in the secondword can be found in the first array of characters with indexOf (at least that’s what I think I accomplished).
However, I cannot understand why it doesn’t work as supposed.
Hope I can get some additional hints.
This should explain the issue:
I actually fixed that just before checking the forum again.
I was definetly mumbling on a very tiny missed detail.
Thank you though and have a nice day!
And for the sake of those who don’t see the issue themselves, the original code wasn’t checking the last letter in the second word because it was stopping the for loop at length-1 instead of length.
It’s super cool to see that code from repl.it running right here in this forum thread! Thanks for showing me that, @BenGitter.