ES6-14: Borrow the prototype object to inherit the parent constructor

Why doesn't it work to directly assign the prototype object of the parent constructor to the prototype object of the child constructor?

Right way

Example code


Precautions

Guess you like

Origin blog.csdn.net/sinat_41696687/article/details/113853567