原文:https://mp.weixin.qq.com/s/zLYyO1X-WspZUTurEZBJeg
1、数值 == 比较
var a = true
console.dump( a==1 && a==2 )
2、函数执行结果 === 比较
var b = time("2000-1-1","%Y%m%d")
var tm = time("2000-1-1","%Y%m%d")
console.dump( b.addday(1).diffday(tm)===1 && b.addday(1).diffday(tm)===2 )
3、元表取值 === 比较
var c = {
i=0,
@{_get = function(){
owner.i++
return owner.i;
}
}
}
console.dump( c[1]===1 && c[1]===2 )