Keywords constructor prototype object, an object instance

A, constructor; points instance object constructor function

Two, prototype; prototype object constructor executes

Three, __ proto__; every object, referring inherited prototype object, the top level is the Object

Four, hasOwnproperty (): can detect the presence of an attribute instance, the presence or prototype, at a given known properties of the object instance is present, it will return true.

person1.hasOwnproperty("name")

 Five, isPrototypeOf (); detecting whether the object exists inheritance

Person.prototype.isPrototypeOf(person1)  //true

 Six, propertyIsEnumerable, to determine whether the property can be enumerated.

Guess you like

Origin www.cnblogs.com/xianxiaoan/p/11083234.html