var myObject = {
foo: "bar",
func: function() { var self = this;
console.log(this.foo);
console.log(self.foo);
(function() {
console.log(this.foo);
console.log(self.foo);
}());
}
};
myObject.func();
程序的输出是什么?
欢迎免费使用小程序搜题/刷题/查看解析,提升学历,成考自考报名,论文代写、论文查重请加客服微信skr-web
var myObject = {
foo: "bar",
func: function() { var self = this;
console.log(this.foo);
console.log(self.foo);
(function() {
console.log(this.foo);
console.log(self.foo);
}());
}
};
myObject.func();
程序的输出是什么?
A.bar bar bar bar
B.bar bar bar undefined
C.bar bar undefined bar
D.undefined bar undefined bar
正确答案C
×
提示:小程序已经收录此题,请在小程序查看名师解析。翰林刷小程序提供搜题,刷题,助你轻松通过考试