oojs icon indicating copy to clipboard operation
oojs copied to clipboard

第6章 继承--6.3 uber—子对象访问父对象的方式

Open muxiaoyingying opened this issue 8 years ago • 0 comments

P182 var const = this.constructor; return const.uber ? this.const.uber.toString() + ', ' + this.name : this.name;

=>(Uncaught TypeError: Cannot read property 'uber' of undefined)

var result = []; if(this.constructor.uber){ result[result.length] = this.constructor.uber.toString(); } result[result.length] = this.name; return result.join(',');

muxiaoyingying avatar Dec 20 '17 03:12 muxiaoyingying