🔸prototype

function's `prototype` property.

JSvalueobjectfunction ⟩ prototype

⭐️ every function has a default prototype. (with the only constructor property that points back to the function itself)

function A(){}
A.prototype.constructor === A        // true

if A.prototype is an object, then let a = new A() will set a.__proto__ = A.prototype.

Last updated

Was this helpful?