class field
JS ⟩ class ⟩ definition ⟩ class fields
class fields are defined on the instance, not on the prototype.
👉 MDN ⟩ arrow functions used as methods
The class fields are initialized:
base class: before
constructor()
derived class: immediately after
super()
👉 更詳細內容,請看: override class fields
Last updated
Was this helpful?