function Parent(name) {
this.name = name;
this.arr = [1];
}
Parent.prototype.say = function() {
console.log('hello')
}
function Child(name,like) {
Parent.call(this,name,like)
this.like = like;
}
Child.prototype = Parent.prototype // 核⼼ ⼦类原型和⽗类原型,实质上是同⼀个
不理解“Child.prototype = Parent.prototype // 核⼼ ⼦类原型和⽗类原型,实质上是同⼀个”这一段
谢谢解答,麻烦了!