when I read the book introduction to ES6, I introduced the arrow function this
. The immobilization ofthis is not because there is a mechanism for binding this inside the arrow function, but because the arrow function does not have its own this, at all, so the internal this is the this of the outer code block.
there are also clouds on the Internet
The this binding of thearrow function looks at the object under which the function of this is defined, and this points to the object to which it is bound
const Person = {
"sayHello": () => {console.log(this)}
};
Person.sayHello();
Why does the this here point to window? Why not the this. of the Person object of the external code block