Mirror of You Don't Know JS: this & Object Prototypes, this All Makes Sense Now!
this & Object Prototypes
You Don't Know JS:
this All Makes Sense Now!
In Chapter 1, we discarded various misconceptions about
this and learned instead that
this is a binding made for each function invocation, based entirely on its call-site (how the function is called).
this binding, we have to understand the call-site: the location in code where a function is called (not where it's declared). We must inspect the call-site to answer the question: what's this
this a reference to?