See line 25 in Mozilla's Guide. It says that it's wrong to use code equivalent to
SubType.prototype = new SuperType();
I sort of get the idea that you can't call new SuperType()
without any arguments if it requires arguments... but not really because there's no function signatures in JavaScript. Shouldn't calling new SuperType()
without any arguments just lead to the argument being undefined
? I guess that could lead to errors though.
More importantly, the guide says that there's other reasons why it's wrong to use SubType.prototype = new SuperType();
. What are they?