Advanced JavaScript ----- explicit prototype property, the implicit prototype property, the prototype object

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/xiaoke5491/article/details/102724288

In fact, I do not understand, first recorded.

1. All objects are instances of implicit prototype properties.

2. Each function has a function prototype prototype display properties.
3. The value of the object which is implicit explicit prototype prototype corresponding constructor.
4. The function prototype property: when added automatically defined function, the default value is an empty Object object.
The proto object attributes: automatically added when creating an object, the default value constructor prototype property values.
6.function Foo {} is equal to var Foo = new Function () so there is an implicit prototype property, i.e., all functions are implicit and display prototype properties.
7. implicit function prototype all are equal, new Function are generated.
8.function Function () displays both properties also have implicit prototype prototype and the same attributes described Function = new Function.
9.function Object () function is implicit equal prototype prototype display Function further examples of each function is described Function (including his own).
10. The display function prototype object pointed to the default instance of the object is empty Object, Object single satisfied.
Note: The example shows also the Object Function Prototype
11.Object prototype prototype object is the end of the chain, i.e. null

//创建一个构造函数
function person(name){
    this.name=name
}
//创建一个构造函数的实例
var person1=new person;

Here Insert Picture Description
Here Insert Picture Description

Here Insert Picture Description
Some confusion, think of it continue to figure out

Guess you like

Origin blog.csdn.net/xiaoke5491/article/details/102724288