function bouncer(arr) { rule=[false,null,0,"",undefined,NaN]; changed=[]; for (i=0;i<arr.length;i++){ dis=false; for(j=0;j<6;j++){ if(arr[i]===rule[j]){dis=true;} break; } console.log(dis); }}bouncer([false, null, 0, NaN, undefined, ""]);为何不输出6个true?
添加回答
举报
0/150
提交
取消