You are viewing a single comment's thread. Return to all comments →
And just because we can, here is a version using reducer:
function getCount(objects) { return objects.reduce((prev, o) => { return prev + (o.x == o.y); }, 0); }
Seems like cookies are disabled on this browser, please enable them to open this website
Day 4: Count Objects
You are viewing a single comment's thread. Return to all comments →
And just because we can, here is a version using reducer: