阅读背景:

如何使用forEach删除列表中的元素?

来源:互联网 
var people = ['alex','jason','matt'];

people.forEach(function(p){
    if(p.length > 4){
       //REMOVE THIS PERSON or pop it out of the list or whatever
    }
});

console.log(people) //should return ['alex','matt']
var people = ['alex','jason','matt'];

people.f



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: