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.
I had exactly the same issue, I tested this on multiple environments, using a similar sorting function and it is not at all the code's fault. It's probably a problem with the environment (Node.js 6 I believe it is) having a bit of an undefined behavior. MDN highlights that this issue might come up in certain environments: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort
Too bad, that was a pretty elegant solution in my opinion.
It's your code's problem. Please review how to use a sorting comparison function properly and raise future code problems as a
question
.