// this是js中的关键字,不同的地方this代表的意义也不一样
/*
1.全局中的this - window
2.对象方法中的this - 当前这个对象
3.事件函数中的this - 事件源
4.普通函数中的this - window
5.定时器中的this - window
6.自调用函数中的this - window
7.箭头函数中的this - 箭头函数上级作用域的this
8.构造函数中的this - new出来的对象
*/
// 函数定义好,并不知道this代表什么,主要是看函数最终是如何调用的
/*
定义普通函数
当做事件函数使用 - 事件源
当做对象方法使用 - 对象
当做定时器要执行的函数 - window
剪头函数中的this - 箭头函数上一行代码中的this
*/