Skip to content

Commit

Permalink
generalize implementation for Dollar.times
Browse files Browse the repository at this point in the history
Tasklist:
- $5 + 10CHF = $10 if rate is 2:1 🎯
- $5 * 2 = $10 ✅
- Make "amount" private
- Dollar side-effects?
- Money rounding?
  • Loading branch information
kaiosilveira committed Sep 28, 2022
1 parent 3c1af53 commit 03bce04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ export default class Dollar {
}

times(multiplier: number) {
this.amount = 5 * 2;
this.amount *= multiplier;
}
}

0 comments on commit 03bce04

Please sign in to comment.