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.
Exactly. In my case I knew the sort function of array, but thought it would be more useful to me to try and write the good old bubble sort, which I haven't used for years. Then I realized I forgot about the many sorting techniques I've learnt in college. I guess this is the purpose of katas; to improve your skills and to get the rust off of you.
@blesh: Many of these katas don't make any sense. These are just exercises to improve your skills, learn language features you didn't know before or try out different ways to solve a problem.
I saw one comment where somebody discovered the "sort"-function of JavaScript - at least for this person I think the Kata fulfilled its purpose!
With regard to changing the input-array, there was some discussion about whether this is good practice or not. There has been no conclusion, as far as I remember.
I don't think so. Sorting the existing array and returning that fulfills the requirement "output a sorted array". There is no requirement given, that says, that the original array must not be changed.