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.
tbh, I would rather read the second one. But of course I'm biased, comming from a C background.
this should be the best solution!
just a comment: best comments is the own code.
This comment is hidden because it contains spoiler information about the solution
yeah, i thought about regex before anything, than i tried the for loop.
regex can be 87% slower than own implementation using for loop. shouldnt matter tho. gg
shouldn't reduce be slower than a regular for loop? http://jsperf.com/reduce-vs-loop/2
http://jsperf.com/reduce-vs-loop/2
Make it legible and understandable. Sure, it's a one liner. But not everyone will get it first try. So, my advice is: Just make it simpler.