Partial inheritance between constructors in different files (JavaScript)?
问题 I have two constructors in two different js files. I want the constructors to have two methods that are the same (same name and functionality) and one method that is called the same but works differently (same name but not the same functionality). There will also be a couple of other properties that are the same in both constructors. The way I have tried to achieve this is by having one of the constructors inherit the other and then declare a new method with the same name as an old one (see