functionFather(name,age){// this指向父构造函数的对象实例this.name = name
this.age = age
}functionSon(name,age){//this指向子构造函数的对象实例
Father.call(this,name.age)}var son =newSon('son',18)
console.log(son);
1.2 借用构造函数继承父类型方法
Son.prototype =newFather()
Son.prototype.constructor = Son
Son.prototype.exam=function(){
console.log('exam');}