inheritance using underscore
问题 I've been given a class - Zoo.Controller = (function() { function Controller() {} Controller.prototype.params = {}; Controller.prototype.set_params = function(params) { this.params = params; return this; }; return Controller; })(); and I want to inherit from that class using _.extend Zoo.Controllers.WhaleController = _.extend({ new: function () { // do something } }, Zoo.Controller); When I try to instantiate that class like so... this.whale_controller = new Zoo.Controllers.WhaleController();