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.
Could you clarify this? I'm lost when reading it.
You don't need to sort the array. The whole kata is about moving zeros to end, not sorting them.
Well I truly hope it doesn't work, because
arr.sort(function(){})
doesn't make sense. If you don't provide a function for sort, it's gonna sort by comparing string representations. If you provide a function for sort, it takes2 arguments
and returns a number to tell which of the 2 should stay left or right. If you provide no arguments, I don't even know what it's supposed to do, compare undefined < undefined? (I don't know :P )Anyway, the kata has about 17500 completions in JS, so I don't think this is an issue... If you think otherwise, open a new question / issue.