let a = {
name: 'zhangsan',
valueOf(){
return 100;
}
};
let b = 100;
console.log(a==b); //true
let a = {
value: 1,
valueOf: function() {
return this.value++;
}
};
console.log(a == 1 && a == 2 && a == 3); // 输出 true