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.
nice work! But the question wanted to return NEW array
Yes, that way the original array that was passed in as a parameter is not modified.
This comment is hidden because it contains spoiler information about the solution
Yes, it is working. But it also mutates the inputArray, which might be unwanted and is considered bad practice. It would be better to keep the function pure and return a new array instead.