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
Just like life
Why?
Using OR instead of ternary operator in this case is about 10 times slower
ASI is not quite as evil as some other JS features, but it's best not to rely on it.
No, JS automatically performs semicolon insertion so it doesn't matter (at least when line breaks are not involved)
I loved this! Thank you, learned a lot here.
Object.keys
is only supported in IE9 and above, so not without a polyfill.See here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys
Loading more items...