The instructions say the function takes 1 array as an argument which you can see from the test functions, for example:
mutation(["floor", "for"])
The test function call you have used does not match the requirements of the question:
console.log(mutation("z", "qrstuz"));
There may be other things wrong as well but you need to start on the right basis and move forward. Please make these changes and try again. You can post your updated code to this thread if you are still having probems.
Thanks, I have renewed the code as following, I am checking if there is any repeated element in the array that i combined within the array, but it is not working, am I in the right direction?
Pleas update the post to improve the readability of the code. When you enter a code block into a forum post, please precede it with three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add the backticks.
I see one thing here, you put a value in result with quotes, that means this is not a boolean but a string, what do the user stories ask you to return? a boolean or a string?
you should be able to pass some tests at that point, but for all of them you need to also have the correct logic and I have not checked that carefully yet, I have doubts tho, because you are checking the letters in a way that does not see is going to work
also what is the line char1.push(char2) doing? why are you putting all the letters inside one word?
I also see curly quotes, but I suppose that is an affectation from posting on the forum, but in case, you must use straight quotes, these ones → ""