var name = "123";
var object = {
name: "My Object",
getNameFunc: function() {
return this.name;
}
}
console.log(object.getNameFunc()); //My Object
console.log((object.getNameFunc)()); //My Object
console.log((object.getNameFunc = object.getNameFunc)()); //123
为啥最后输出的是123?object.getNameFunc = object.getNameFunc是什么意思?
相关分类