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.
The returned type is not a problem in itself, in this case JS coerces booleans to numbers, however returning only 0s and 1s makes the sort unstable for longer arrays (it works for random tests with arrays limited to 8 elements).
He probably dont even know, cause he just copied this solution:
https://www.codewars.com/kata/reviews/52aaf568fd48ce4e7b00068f/groups/58342174fa17ada46e0003e1
And made its 'look better' (shorter code = more popular here)
Your sort callback should be returning an integer and not a boolean.
For more details, check out: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort