function Teacher(){
this.mSkill="JS/JQ";
this.students=500
}
var teacher=new Teacher()
Student.prototype=teacher
function Student(){
this.pSkill="HTML/CSS"
}
var student=new Student()
student.students++
console.log(student,teacher)
运行结果