I came across this slide: http://www.slideshare.net/stoyan/javascript-patterns#postComment
at page 35:
Option 5 + super + constructor reset
function inherit(C, P) {
var F = function(){};
F.prototype = P.prototype;
C.prototype = new F();
C.uber = P.prototype;
C.prototype.constructor = C; // WHY ???
}
I don't get it. Can anybody please explain what the last line for ?
C.prototype.constructor = C; // WHY ???
Thanks