UNPKG

qingyun_chenhongli

Version:

wodededede

30 lines (19 loc) 465 B
var People = require('./people'); function Man(name,age,isWorking) { People.apply(this,arguments); this.isWorking = isWorking; } Man.prototype = new People(); Man.prototype.constructor = Man; var man = new Man('ls',10,true); man.say(); // function People( name, age ){ // this.name = name; // this.age = age; // } // // People.prototype.say = function(){ // console.log('我的名字是'+this.name) // } // // module.exports = People;