1.Array.filter()arr.filter(Boolean)2.通过遍历判断数组空字符,undefined, null, false , 0转化为布尔类型都是false;let arr=[1, , null, false, ...
確定! 回上一頁