diff --git a/src/dollar.ts b/src/dollar.ts index 2603133..25d57b9 100644 --- a/src/dollar.ts +++ b/src/dollar.ts @@ -1,9 +1,12 @@ export class Dollar { + private tmpAmount: number + constructor(public amount: number) { + this.tmpAmount = amount this.amount = amount } times(multiplier: number) { - this.amount *= multiplier + this.amount = this.tmpAmount * multiplier } }