We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Day 4: Count Objects
Day 4: Count Objects
Sort by
recency
|
390 Discussions
|
Please Login in order to post a comment
return objects.filter(obj => obj.x === obj.y).length;
function getCount(objects) { let count = 0;
}
function getCount(objects) { return objects.reduce( (acc, cur) => acc + (cur.x == cur.y), 0);
}