function Person (name){
this.name = name; //变量赋值
this.totalName = '人类' //常量赋值
}
function Teacher(name,course){
Person.call(this,name); //可以继承父类的变量赋值(2)
this.course = course;
}
Teacher.prototype = new Person(); //继承Person的常量赋值
var t1 = new Teacher("missHuang",'English');
/**
* 若无(2) 结果是 人类 undefined (没有继承name赋值)
* 若有(2) 结果是 人类 missHuang(继承name赋值)
*/
console.log(t1.totalName)
console.log(t1.name)