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.
This is bad practise in javascript. Functions should not modify arguments they are given or vars outside of themselfs
It is specifically mentioned what the function should return.
If your changes to the array aren't picked up, realise that an array is passed by reference. Are you changing the reference, or the values it points to?
It should be specifically mentioned that there's no need to return item as an array. Also, despite having the completely correct answer in my array, the kata only seems to pick up the initial value of the array.