Prototype object

1. Create an object in three ways: object literal, new Object (), and plant functions Constructor

2. The object-oriented three core features: a package inheritance polymorphism

3. A method for detecting an object property: hasOwnProperty () method does not detect the prototype (return boolean value), in the operator: Detection Prototype

4.object.prototype methods can be shared by a prototype property attribute object created object instance of the object

The prototype chain: ① instance constructor chain structure formed by a link _proto_ _proto_ property attribute instance _proto_ ② prototype object constructor construct has a pointed configuration attribute can be pointed directly ③ the content constructor prototype chain can be the object / function access

6. Find the object attributes: start Find the object itself is not found return a Constructor function returning Finding no return no return undefined prototype prototype chain strand

7. Note that the object-oriented items: ① ② property variable into a function to convert that method to convert ③this

 

To share with the whole theoretical knowledge ah ~ I hope you like

                                    

Guess you like

Origin www.cnblogs.com/2019yjy/p/11329523.html