Better solution for forEach and if ? map, filter Javascript

前端 未结 0 558
不知归路
不知归路 2021-01-23 00:34

I really need bettter solution for this logic:

    this.allClients.forEach(obj => {
     if(obj.status === 2) {
       this.numOfWaitingUsers.push(obj) 
     }         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题