function remove(arr, item) {这样删不完呢arr.forEach((i,x)=>{ if(i==item) arr.splice(x,1) }) return arr }remove([1, 2, 2, 3, 4, 2, 2], 2)
function remove(arr, item) { var num = [] for(let str in arr){ if(arr[str] != item){ num.push(arr[str]) } } return num }
function remove(arr, item) { return arr.filter(x => x != item); }