var object = {
test: {
doSomeThing() {
function fun1 () {
return this;
}
return fun1();
},
doNextThing() {
var fun2 = () => this;
return fun2();
},
doLastThing() {
return this;
}
}
};
console.log(object.test.doSomeThing()); // window
console.log(object.test.doSomeThing.call([1]));//这里的call([1])完全不懂是 //啥意思
web阿周
相关分类