functionParent(name,age){
this.name = name
this.age = age
}functionChild(name,age,gender){
Parent.call(this,name,age)this.gender = gender
}const ming =newChild('ming',18,'男')
console.log(ming);
继承的几种方式1、构造函数继承原理:利用call,apply,bind等方法,在构造函数内部去调用别的构造函数,为己所用.缺点:原型对象的函数无法复用 function Parent (name,age) { this.name = name this.age = age } function Child (name,age,gender){ Parent.call(this,name,age) this.gender = gend