Untitled

mail@pastecode.io avatar
unknown
javascript
3 years ago
292 B
2
Indexable
// PIERWOTNA WERSJA w KLASIE Vehicle

    getRange() {
        let range = this.fuelCapacity * this.fuelEfficiency;
        return range;
    }


// WERSJA PO ZMIANIE w klasie HybridVehicle

    getRange() {
        return (this.fuelCapacity * this.fuelEfficiency) + this.electricRange;
    }