SOURCE

let users = [ {"name":"张三","age": 10},
{"name":"李四","age": 20},
{"name":"王五","age": 10}
]

//方法二:使用reduce

const result1 = users.reduce((c, u) => u + (u.age > 10), 0)
console.table(result1)
console 命令行工具 X clear

                    
>
console