This problem of js Arrow function

I don"t understand why this is window in this broken code. Thank you for your understanding. Thank you.

var o = {
    fn:() => {
        console.log(this)
    }
}
o.fn()
Feb.28,2021
The

arrow function has no this equal to the external this
external is the object pointed to by a variable o and o is defined in the global
so this is global window


arrow function is determined when it is defined, it is an external this.


because the arrow function is not bound to the context

Menu