为什么报 Uncaught TypeError: console.log(...) is not a function?而另两种方式可以
var x = {
fn: function () {
console.log(this)
// !function () {
// console.log(this)
// }();//正确
(function () {
console.log(this);
})();//Uncaught TypeError: console.log(...) is not a function
}
};
(function () {
console.log(this);
})();//正确
x.fn()
猛跑小猪
相关分类