function Student(name) { this.name=name; } Student.prototype.say=function(){ return 'Hello, ' + this.name+'!'; } function Cat(name) { return new Student(name|| {}) }
Sign in to make a reply
hxbdudu
function Student(name) { this.name=name; } Student.prototype.say=function(){ return 'Hello, ' + this.name+'!'; } function Cat(name) { return new Student(name|| {}) }