<! DOCTYPE html>//prototypes //the value of the prototype property of the constructor functionPerson () { This. Name = "ADFS"; } //Access Prototypes: //Console.log (person.prototype); //methods to add to the prototypePerson.prototype.say =function() { //Console.log ("The method of the archetype of this matter");Console.log ( This. Name); }; Person.prototype.name= "AAAAAAA"; //represents a non-public method that can be used, but there may be a problem //person.prototype._init = function () {}; //to create an object by using a constructor function varp =NewPerson (); //through the example of P, access to the method or attribute in the prototypeP.say (); Person.prototype.say (); //the following two ways to call the difference: //P.say (); //Person.prototype.say (); // //1 Calling a method through an object is a method found through the property search principle and then called //2 Direct access to the method, and then the call to the //3 Method Internal this points to a different //method inside the this: Who calls the method, this is the point to who //__proto__ //you can also get to the prototype by leading to direct access //as long as it is a non-standard attribute with __, it can no longer be used in the actual project //The names of the methods written in some frames are also underlined: //means that these methods are used internally by the framework. //If you use it, the problem is, the framework is not responsible. //p.__proto__Console.log (Person.prototype = = = p.__proto__);//true //The prototype property of the constructor and the __proto__ of the object represent the same object //It 's just a different way to access the object (prototype)P.__proto__.say (); //Console.log (p.__proto__); //Two terms: //prototype prototype Properties //__proto__ Prototype Object //It's like O1 and O2 are two variables, but these two variables are the same object //var O1 = {}; //var O2 = O1;</script></body>Prototype objects in JavaScript