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.
Smart to have to variables incrementing in the for-loop. Haven't seen that before.
Ohh the slicing is smart. I just handle the edge cases with n < 3 by early return.
Could have made the return implicit and make it a bit more readible.
Good thing to pipe it all but still making the nested function readable with the good spacing.
Good solution.
Absolutely my favorite since it's so easy to read and understand.
Also, you got the clarity without touching regex.
IMO a walk.forEach() would be even cleaner.
I rarely if ever use for-loops anymore.
Declarative code is just so much easier to read and understand.