腾讯认证十周成为数据分析师贪心学院
obj.x 的值是什么?
上述中的 this
会打印出什么呢?
let obj = {
x: console.log( this ) // console.log( this ) 的值是 undefined ==> obj.x === undefined 其中的 this === window}
fn1()
fn1() {
console.log( this ) // 2. this === obj
setTimeout( function(){
console.log( this )
}, 10 )