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.
This comment is hidden because it contains spoiler information about the solution
Here we go: jsbench.me/ffl0wgbw9g/1 sorry for late response, it shouldn't really matter but just FYI. I was probably pretty sleep deprived when commented this, don't think of me like i'am trying to be smartass or something
I think he doesn't know himself lol
Oh, yes, you are right!, my bad here.
Why should it fail? If you sort an empty array you'd get an empty array. No errors here.
My question here is, this doesn't fail when nums argument is an empty array?
If you're gonna claim something like this, at least explain why
This comment is hidden because it contains spoiler information about the solution
Why?
Using OR instead of ternary operator in this case is about 10 times slower
Clever, but works only if nums arg is null or array. I think (nums instanceof Array) check should be instead of "or". But still nice and easy.
Looks good! I need to give more ateention to tricks like ||