看到大神在介绍this的时候第二个使用环境,原文在此:http://www.ruanyifeng.com/blo...这里的对象o应该就是this?如果是的话为什么这样最不全等?
function test(){
console.log(this.x);
}
var o = {};
o.x = 1;
o.m = test;
console.log(o.m());
console.log(o===this);
输出的分别是:1false
慕妹3242003
相关分类