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.
Trivial map/filter/reduce is not a novel kata idea.
Your example solution is regrettably imperative - which is entirely a matter of taste. :D I just like a more functional style.
It's also showcasing some Less-than-good Practices, such as inconsistent indentation and
for .. in
instead offor .. of
.See the fork. I suggest this is not what you want to be showcasing as an example solution.
IMO the spec is a bit ambiguous. It doesn't specify that special values such as
null
will be tested and doesn't specify that nested arrays and/or objects will not be passed in. Perhaps you could clarify in the Description a bit exactly what type of values the solver should expect to deal with in the array passed in? Cheers :)