stone1314

Results 2 comments of stone1314

var obj = {}; console.log(obj.toString());//[object Object] {}==true =》{}==1 =》toNumber({})==1 =》NaN==1 =》false 是这样吗楼主?

{}==!{}为false 和题目2的分析过程类似,先计算右边结果为false;然后再通过 valueOf()方法=>{}=>toString()方法=>object=>true,得到左边结果为true。 =============================== 很不明白左边为什么是true?