为什么报 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()
慕的地6264312
猛跑小猪
随时随地看视频慕课网APP
相关分类