❗arrow function as class field❗️
🚧 under construction
Last updated
🚧 under construction
Last updated
JS ⟩ objects ⟩ arrow function ⟩ as class field
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 static fields).
👉 MDN ⟩ arrow functions used as methods ⭐️