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 think the same. My solution worked for 3 tests but fails at the 3rd one!
since there
iswas no spec that requires it to be stableSo it works in modern engines, but the kata isn't compatible with Node 12 at the moment.
The problem with using sort here is that sort in JS in some environments is unstable, since there is no spec that requires it to be stable. You can find more info on this problem in this article:
https://medium.com/@fsufitch/is-javascript-array-sort-stable-46b90822543f
I aleo try to use sort function to solve this Kata, but I fail. You can get my code by search 'sort' in the browser
A problem with your code is not a kata issue, please read this: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution
There are more than 23k solutions in Javascript.
This code have problems. In my Studio Code my script run without Errors, but here the results give "null" on some values of the array. I tried all the arrays used in this code without problem.
This comment is hidden because it contains spoiler information about the solution