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.
indeed 'almost everyone', it's very readable and easily understood
we use predefined methods, of course we can define faster sort. eg. using .replace(/./g,...)
Finally, found a piece of code that doesn't look like some trainee rudiment. A breath of fresh air, thank you.
Relying on non-standard engine behavior can not guarantee you anything at all. If tomorrow V8 devs decide to introduce some optimizations that break this rule - your code is broken as well. Standards are being created with a purpose.
As for 2nd, more lines of code is not the sign of bad code - we write code for humans, not for the machines. If your code is tough for human to understand - it's a bad code.
TBH, type coercion in JS is terrible both as a concept and as an implementation. As many other things in JS. But that doesn't mean anyone should "prefer Python instead".
Fun fact - almost everyone use split/sort approach, which in fact is very slow.
This site surely lacks some kind of
downvote solution
functionAdd one more test - set
felix.weight
second time and check average. This will surely show some broken solutions.