What are the differences between the 2 following approaches for inheritance?
Subclass.prototype = $.extend(true, {}, Parent.prototype, proto);
and
function Subclass(){
var parent = new Parent();
$.extend(true, this, parent);
}
Pros and cons of each approach?
Thanks!
EDIT: I'm currently using the 1st approach to extend my classes, but I'm thinking of instantiating a parent object instead, so that the constructor of the Parent class gets called. Although I'm not convinced I'd always want that...