判断一个数字在数组中出现次数

arr.filter(item => item === 1).length

posted @ 2020-07-14 15:33  苏小白啊  阅读(380)  评论(0编辑  收藏  举报