现在我的数组里面有name和statusletdata=[{name:"小明",status:false},{name:"小红",status:false},{name:"小张",status:true},//一次出现{name:"小墙",status:false},{name:"小粉",status:false},{name:"小军",status:false},{name:"小钰",status:false},{name:"小访",status:true},//二次出现{name:"小源",status:false},{name:"小方式",status:false},{name:"小佛",status:true},//三次出现三次之后还有true的变为false{name:"小付款",status:true},{name:"小哦咯",status:true},{name:"小来了",status:false},]console.log(data);我想把从第一个开始算,一直到出现过三个true,然后把剩下的都变为false,这个怎么实现呢?
慕婉清6462132
相关分类