🚧 under construction
Last updated 2 years ago
Was this helpful?
⟩ ⟩ ⟩ as class field
the body of a class has a this context.
arrow function as class field closes over the class's this context.
the this inside the arrow function's body:
will correctly point to the instance (or the class itself, for ).
it is a closure, not the function's own binding, the value of this will not change based on the execution context (call site)
👉 MDN ⟩ ⭐️
arrow function as method❗️.
class field
⭐️