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.
Nice!
Thanks mate :D
Nice! :D
Watch out for inconsistent spacing, which looks pretty bad usually: you space
i = 1
, but then you press everything together. It might be just aesthetical, but want to be as orderly as possible in your code, usually.Nice refactoring; do you understand all of it, including why it works despite lacking final round parentheses?
Repeated code, can you keep it DRY?
Also, filtering here will create a temporary sub-array after running through all the
n
elements ofa
andb
: can you do it in one (more efficient) pass with just.reduce()
?Nice one!