// 题目1:如下代码输出什么? hello if ("hello") { console.log("hello") } // 题目2:如下代码输出什么? 无输出 if ("") { console.log('empty') } // 题目3:如下代码输出什么?blank if (" ") { console.log('blank') } // 题目4:如下代码输出什么?array if ([0]) { console.log('array') } if('0.00'){ console.log('0.00') //0.00 } // 题目5:如下代码输出什么? console.log("" == 0);//true console.log(" " == 0);//true console.log("" == true);//false console.log("" == false);//true console.log(" " == true);//false console.log(" " == false);//true console.log(!" " == true);//false console.log(!" " == false);//true console.log("hello" == true);//false console.log("hello" == false);//false console.log("0" == true);//false console.log("0" == false);//true console.log("00" == false);//true console.log("0.00" == false);//true console.log(undefined == null);//true console.log([0] == 0);//true var obj = { a: 0, valueOf: function(){return 1} } console.log(obj == "[object Object]")//false console.log(obj == 1)//true console.log(obj == true)//false