I saw two different patterns and explanations. One from DailyJS and many others: Rectangle.prototype = new Shape();
and then there's Crockford's here which implies just Rectangle.prototype = Shape;
Now theory-wise, why you need to run the 'new'? it runs the constructor function, yes. it also assigns the Rectangle's prototype the Shape's prototype. but we should be able to do inheritance just with a simple assignment of the parent into the prototype.
I wondered if the reason is prototype chaining. it seems, that in case 1, it will create a prototype chain. Meaning, that the Rectangle prototype will have the Shape prototype. In the second case, the Rectangle's prototype will just have Shape's methods - but not Shape's prototype methods.
Is that right? many thanks for any thoughts.