1.this指向window
(1)全局函数里this指向window
(2)箭头函数里this指向window
(3)事件绑定函数里this指向window
2.this指向自身函数
谁调用我,this就指向谁
3.this指向undefined
严格模式下,this指向undefined
4.setTimeout里的this
(1)普通函数this指向window
(2)箭头函数this指向上一层环境
(1)全局函数里this指向window
(2)箭头函数里this指向window
(3)事件绑定函数里this指向window
谁调用我,this就指向谁
严格模式下,this指向undefined
(1)普通函数this指向window
(2)箭头函数this指向上一层环境