0
点赞
收藏
分享

微信扫一扫

javascript中的作用域

var foo = {
baz: 1,
bar: function () {
return this.baz;
}
};
console.log(foo.bar()); //1
(function () {
this; //Window
console.log(arguments[0]()); //undefined
})(foo.bar)



举报

相关推荐

0 条评论