js运算符!

1.注意字符串“1”、“0”,数字1、0,空字符串,undefined和null。

var arr = [undefined, null ,1, "1", 0, "0", ""];
arr.forEach((a)=>{
  console.log(a,!a,!!a,!!!a);
})

原文地址:https://www.cnblogs.com/sunupo/p/15598027.html