1.原型继承
function Parent(){}
function Child(){}
Child.prototype = new Parent();
2.构造函数继承
function Parent(){};
function Child(){
Parent.call(this, argument);
}
3.原型+构造函数继承
function Parent(){};
function Child(){
Parent.call(this, argument);
}
Child.prototype = new Parent();
4.class继承
class Person{
}
class Child extends Person{
}