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.
Beautiful haskell
No, I don't think so.
Just an alternative way how to write 1000 with 1 less character :)
Most real life projects I have worked on, already had lodash added, so you would just continue using it for convenience.
However, you are right for cases when you would add a whole library to solve a small case.
Solid!
You had me at
meth
:)Clever with
layout.indexOf(c) % 5
:)This is indeed beautiful. And pretty redable still.
This comment is hidden because it contains spoiler information about the solution
That's why this is a level 6 kata :) Performance is not a requirement.
Starting from typical level 4 katas this wouldn't fly most likely...
Not necessarily. However, knowing these approaches, JS lets you write shorter, terser and in most cases more bug-free code.
You can achieve a lot faster. At the expense of some performance, of course, when it matters. But most of the time performance is not an issue.
Writing your own code is not bad per se, but you do get more chances to get it wrong and let bugs sneak in.
Built in JS array & object methods are well tested and relying on them is pretty predictible and less bug-prone.