1. Each function created has a prototype (prototype) attribute. This property is a pointer to an object. The purpose of this object is to include properties and methods that can be shared by all instances of a particular type. The literal meaning is that prototype is the prototype object of the object instance that was created by invoking the constructor. The advantage of using a prototype object is that it allows all object instances to share the properties and methods that it contains.
2. Whenever a new function is created, a prototype property is created for the function based on a specific set of rules. This property points to the prototype object of the function. By default, all prototype objects will automatically get a constructor (constructor) property. This property contains a pointer to the function where the prototype property is located.
The instance uses the isPrototypeOf () method to determine whether there is a structural relationship between objects, Person.prototype.isPrototypeOf (Person1);
JavaScript prototype Mode learning