Skip navigation

Every object has a hidden [[Prototype]] property, which is used for inheritance. Functions additionally have a public prototype property, which is used only when the function is used as constructor: When an object is constructed using new, the [[Prototype]] property of the new object is set to the prototype property of the function that was used as constructor.

[[Prototype]] is accessible via __proto__ or getPrototypeOf in some browsers.

Leave a comment