The constructor has a prototype property that points to the prototype object
The instantiated object has a [[prototype]] property that points to the prototype object prototype object that has a constructor property that points to the constructor. If an object in the instance overrides a property or method in the prototype object, the connection to the prototype is cut off by this property or method. Even if the property or method is set to null later, the connection is not restored. Only the delete operator can be completely removed. Note: This property is called after setting the property to NULL, the display is null, the method is set to null and the method is called, which shows the object is not a function. After the object prototype is rewritten using the literal method, the constructor of the object's prototype no longer points to the constructor, but to object. JS Advanced P155 In addition, each constructor prototype has only one: "JS advanced" P167function supertype () {
This.color = ["Red", "Blue"];
}
Function subtype () {};
Subtype.prototype = new Supertype (); Executes only once, using a new
var a = new subtype ();
var B = new subtype ();
Console.log (A.color = = B.color); True to create a custom type of three popular methods: 1. Combining the constructor pattern with the prototype pattern (using constructors to define instance properties, using prototypes to define shared properties and methods) JS Advanced P159 2. The combination inherits "JS advanced" P169 3. Parasitic combined inheritance "JS advanced" P172
constructors, prototype objects, and their instance objects