1. property inheritance only occurs when the attribute is read, but does not occur when the attribute is written. If the P attribute of an object o is set, and O inherits the P attribute from its prototype, this occurs only when a new P attribute is directly created in O. However, O has its own P attribute, and it no longer inherits the P value from its prototype. When reading the value of P, JavaScript first looks at the properties of O. Since P is defined in O, it does not need to look up the prototype object, the P attribute value defined in the prototype is not found. We sometimes say that the property P of O is "hidden" or "hidden" the property P in the prototype.
2. Javascript supports a data type called an object, but JavaScript does not have a formal concept of classes. Javascript is a real object-oriented language because it uses prototype inheritance instead of class-based inheritance.