面试题答案
一键面试function Parent() {
this.value = 1;
}
function Child() {
Parent.call(this);
this.value = 3;
}
Child.prototype = Object.create(Parent.prototype);
Child.prototype.constructor = Child;
const instance = new Child();
console.log(instance.getValue());