🔹constructor

JSvaluefunction ⟩ constructor

a function that supports the [[Construct]] internal method, that is, a constructable function.

function vs. constructor

  • function

  • constructor

    • object that supports the [[Construct]] internal method.

    • every constructor must support [[Call]] (that is, every constructor is a function)

👉 ES2023 ⟩ Additional Essential Internal Methods of Function Objects

👉 compare

Last updated