原型链继承:子类的原型指向父类的实例
通过改变子类的prototype来实现
function Animal(name) {
this.name = name
this.eat = function () {
console.log(this.name + ' is eating ')
}
}
Animal.prototype.say = function () {
console.log('My name is ' + this.name)