Why we need set Child.prototype.constructor
property to Child
after inheritance. For example
function Parent(a){
this.a = a;
}
function Child(a, b){
Parent.call(this. a);
this.b = b;
}
Child.prototype = Object.create(Parent.prototype);
Child.prototype.constructor = Child // 1)**
As I see the instance of constructor will be the same without // 1) **
line
Why we need this // 1) **
line?