UNPKG

@votemike/property

Version:

Property class and related classes

11 lines (10 loc) 279 B
export default class Sale { constructor(amount, fees) { this.amount = amount; this.fees = fees; } calculateTotalCosts() { const feeCosts = this.fees.reduce((total, fee) => fee.amount + total, 0); return this.amount + feeCosts; } }