js basic review 2-constructor and object prototype __proto__

Let's look at an example. There is a Rabbit constructor. There is a method sing
r1 which is an instance of Rabbit. We find that it r1.__proto__points to an object, and this object and r1的构造函数Rabbitthe prototypepoint to the same object
Insert picture description here
Insert picture description here

Guess you like

Origin blog.csdn.net/dyw3390199/article/details/114956967