为什么这个NULL变量真实?

noo*_*bie 9 javascript browser

我知道nullfalsy.那它为什么表现得好像呢truthy

var status = null;

console.log('status:', status);

if(!!status) {
  console.log('status is truthy');   // it should not print
}

if(!!null) {
  console.log('null is truthy');   // it should not print
}
Run Code Online (Sandbox Code Playgroud)

ASD*_*rte 8

问题是已经存在window.status与之冲突的问题.它有固定器,总是使它成为一个字符串,这会导致你的问题.