Reference blog post: https://www.cnblogs.com/fanzhanxiang/p/8888963.html
The arrow function itself does not have this, so its internal this is 父执行上下文
the this it inherits from. So when calling obj to call func0(), this is window, and the parent execution context is window
name = "window";
var obj = {
name: "obj",
func0: () => {
console.log(this)
console.log(this.name);
},
func1: function() {
console.log(this)
console.log(this.name);
},
}
obj.func0()