//比如刪除上面數組中的所有奇數。
arr?=?arr.filter(函數(v){
回歸?v % 2 = = 0;?//只返回偶數
});
console . log(arr);
//輸出結果?18,22,56