//混合模式继承
function Father(name,age){
this.name = name;
this.age = age;
}
Father.prototype.showName = function(){
return this.name;
}
Father.prototype.showAge = function(){
return this.age;
}
function Son(){
Father.apply(this,arguments);
}
Son.prototype = new Father();
let son = new Son('张小三',18);
console.log(son.showName(),son.showAge());