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
|
368 Discussions
|
Please Login in order to post a comment
OR
function getCount(objects) { let count = 0 objects.forEach((obj) => { if (obj.x === obj.y) count += 1 }) return count }
function getCount(objects) { let count=0; for(let i=0;i