有没有“!!”的谓词是否有区别?

时间:2016-09-13 18:53:01

标签: javascript node.js boolean-logic negation

与标题一样。

let x = anything;

if(x){
  console.log("True");
}

if(!!x){
  console.log("True");
}

此处的输出始终为True True?

0 个答案:

没有答案