JavaScript: How to count the number of objects with a certain value
Let’s say we have an array of people and we want to find out how many people are older than 30.
A simple way would be filtering the array first and then get its length.
|
|
Let’s say we have an array of people and we want to find out how many people are older than 30.
A simple way would be filtering the array first and then get its length.
|
|