JavaScript中数组filter()方法筛选数组元素 function remove(arr, item) { //返回arr中和item不相同的值 return arr.filter(x=>x!==item); }