Object.prototype is one of the rare objects that has no prototype: it does not inherit any properties. Other prototype objects are normal objects that do have a prototype. All of the built-in constructors (and most user-defined constructors) have a prototype that inherits from Object.prototype. For example, Date.prototype inherits properties from Object.prototype, so a Date object created by new Date()inherits properties from both Date.prototype and Object.prototype. This linked series of prototype objects is known as a prototype chain.
An explanation of how property inheritance works is in §6.2.2 . We’ll learn how to query the prototype of an object in §6.8.1 . And Chapter 9 explains the connection between prototypes and constructors in more detail: it shows how to define new “classes” of objects by writing a constructor function and setting its prototypeproperty to the prototype object to be used by the “instances” created with that constructor.欢迎转载,转载请注明来自一手册:http://yishouce.com/book/1/27819.html