Js prototype and prototype chain to explain

Prototype: Each object will initialize a property in its interior, it is the prototype

Prototype chain: When we visit properties of an object, if the object is inside this property does not exist, then he will go to the prototype, the prototype of the prototype will have its own, so he has been looking so down, this is the prototype chain

Guess you like

Origin www.cnblogs.com/rabbitstudent/p/11882604.html