Skip to content

Commit b3f51f0

Browse files
committed
Updated ex2-class.js file.
1 parent dc52d30 commit b3f51f0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Week4/prep-exercises/1-wallet/ex2-classes.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ class Wallet {
3535
}
3636

3737
setDailyAllowance(newAllowance) {
38-
this.dailyAllowance = newAllowance;
38+
this.#dailyAllowance = newAllowance;
3939
console.log(
4040
`Daily allowance set to: ${eurosFormatter.format(newAllowance)}`
4141
);
4242
}
4343
resetDailyAllowance() {
44-
this.dayTotalWithdrawals = 0;
44+
this.#dayTotalWithdrawals = 0;
4545
}
4646

4747
transferInto(wallet, amount) {
@@ -62,11 +62,11 @@ class Wallet {
6262
}
6363

6464
function main() {
65-
const walletJack = new Wallet('Jack', 100);
65+
const walletJack = new Wallet('Jack', 500);
6666
const walletJoe = new Wallet('Joe', 10);
6767
const walletJane = new Wallet('Jane', 20);
6868

69-
walletJack.transferInto(walletJoe, 50);
69+
walletJack.transferInto(walletJoe, 100);
7070
walletJack.setDailyAllowance(80);
7171
walletJane.transferInto(walletJoe, 25);
7272

0 commit comments

Comments
 (0)