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.
@JohanWiltink not sure how that is reinventing? Array.prototype.filter accepts a callback and filters on truthy... so . this isn't reinventing, but rather using as intended. Unless I'm looking at it wrong??
The main point of the reply however was that you shouldn't reduce the dataset more than needed. It can be done once rather than 5 times.
The direction here is good, but it breaks down quickly as your array grows. Also you could do array.filter which might be more clear . Ex: '1st grade': array.filter(x=> x===6).length,
Yea. I would have done this much different, but like ZoZo said, debug rather than re-write.