如题所述
温馨提示:答案为网友推荐,仅供参考
第1个回答 2023-03-08
var oldArr = ['x','y','z','y','x','z'];
var newArr = oldArr.filter(e=>e!='x');
console.log(newArr);
var newArr = oldArr.filter(e=>e!='x');
console.log(newArr);