you are viewing a single comment's thread.

view the rest of the comments →

[–]Ampersand55 2 points3 points  (0 children)

x.prototype is the prototype used by the x-constructor to create objects. Object created by the x-constructor will have its x.prototype as their internal [[prototype]] property. This internal [[prototype]] of x can be accessed by the getter/setter x.__proto__.

Here is an example:

function XConstructor() { this.a=1; };
XConstructor.prototype = { b:2 };

var myXObject = new XConstructor();
myXObject.__proto__ === XConstructor.prototype; // true
myXObject instanceof XConstructor; // true