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.
Without the input value we can't know if your're right or wrong, probably wrong tho:
Take a look at some failed test:
You can see that your function returned 80532 and the next bigger number with the digits of 80352 is 80523.
No problem, you could try not using sort at all.
Sort wasn't stable until recent Node's versions, so, either you find a way to make your sort stable or wait for this kata to have newer versions enabled.
You can visualize how it behaves with an older version here: https://pythontutor.com/javascript.html#mode=edit