按照我的理解console
应该是window
对象下的一个对象console
对象下又有一个log
方法(函数)
那按照this
的定义:在函数中使用this
,当函数被作为某个对象的方法调用时,this
等于那个对象
调用this
的是console
对象 this
应该指的是console
对象 为什么出来的是window对象呢
按照我的理解console
应该是window
对象下的一个对象console
对象下又有一个log
方法(函数)
那按照this
的定义:在函数中使用this
,当函数被作为某个对象的方法调用时,this
等于那个对象
调用this
的是console
对象 this
应该指的是console
对象 为什么出来的是window对象呢
13 回答12.9k 阅读
7 回答2.1k 阅读
3 回答1.3k 阅读✓ 已解决
2 回答1.3k 阅读✓ 已解决
6 回答1.2k 阅读✓ 已解决
6 回答1.1k 阅读
3 回答1.3k 阅读✓ 已解决
在
console.log
这个函数体里面,this
才是console
,你这段程序分明就在这个函数外面……