React-class-extends-new的实现原理(面试例题)
function P(food){ this.food = food } P.prototype.eat = ()=>{ console.log('eatting'); } P.prototype.sleep = ()=>{ console.log('sleeping'); } // 类的实例化 let z