Every object has a hidden[[Prototype]]property, which is used for inheritance. Functions additionally have a publicprototypeproperty, which is used only when the function is used as constructor: When an object is constructed usingnew, the[[Prototype]]property of the new object is set to theprototypeproperty of the function that was used as constructor.
[[Prototype]] is accessible via __proto__ or getPrototypeOf in some browsers.
Advertisement
