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.
IMO it depends. Javascript is a chimera. Maybe you want to mutate the object! But in a pure functional world this is a sin.
I also try to use sort to solve this Kata, but I fail. If there are two zero at the beginning, only one of them will be moved.
You can get my code by searching 'sort' in the browser.
This comment is hidden because it contains spoiler information about the solution
IMHO you should destructure you collection or create a new collection object elsewhere. With your current implementation a user cab mutate source collection (i.e. PaginationHelper.prototype.sortPages() etc).