noo*_*bie 9 javascript browser
我知道null是falsy.那它为什么表现得好像呢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)
| 归档时间: |
|
| 查看次数: |
201 次 |
| 最近记录: |