Prototype and prototypes are two different things, and he's just a preset attribute on Foo. A prototype is a property on an object that points to Foo. Then we can make the shared variable or method by the method of the prototype assignment, like the X assignment on the top.
Method parsing:
1,object.create ()
method creates an empty object that has the specified prototype and several specified properties;
such as Student.prototype=object.create (Persion.prototype );
do not let student instances of __PROTO__ also have those unnecessary methods
student can define the same method as Persion, which is equivalent to rewriting the method in Persion
Instance:
Analytic diagram
Prototype the effect of the modification of the property value on the object before and after creation
1. Effect of property value modification on a created object
2. For objects created later
determines whether the property is again modified in the object
JS's prototype