Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Kata fixed just now.
Yes, I'd say that too. There seem to be a lot of issues with this kata.
You are mutating the input array like that, so the next time a test calls your function with a different number the result is wrong.
Copy and paste your function in repl.it like this:
Exactly. You're mutating the input. Don't do that.
You're mutating the input.
language?
first, please verify that the actual and expected are not swapped by printing to the console your result before returning it