📜  如何使用调用方法在 js 中链接原型 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:39.437000             🧑  作者: Mango

代码示例1
// Linking both
// ElectricCar.prototype is what you want to link
// Car.prototype is where you want to link the ElectricCar.prototype.

ElectricCar.prototype = Object.create(Car.prototype);