What will the following code print?
class Account {
constructor(balance) {
this.balance = balance;
}
deposit(amount) {
this.balance += amount;
}
}
const account = new Account(100);
account.deposit(50);
console.log(account.balance);
What will the following code print?
class Account {
constructor(balance) {
this.balance = balance;
}
deposit(amount) {
this.balance += amount;
}
}
const account = new Account(100);
account.deposit(50);
console.log(account.balance);