Some links between the prototype chain of the object constructor

Constructor:

The constructor with no difference between an ordinary function, are defined by function, in order to make the difference between a normal function and general constructor capitalized;

Constructors can call the new operator,
can also function as like an ordinary call, that if, as an ordinary function call, the method will be automatically added to the window object.

Prototype object:

We each create a function that adds a prototype js internal attributes for this function

Reproduced in: https: //www.jianshu.com/p/cdea7eeb25ee

Guess you like

Origin blog.csdn.net/weixin_34408717/article/details/91303178