✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
class BankAccount {#balance = 0;
deposit(amount) {
this.#balance += amount;
}
getBalance() {
return this.#balance;
}
}
const acc = new BankAccount();
acc.deposit(100);
console.log(acc.getBalance());
console.log(acc.#balance);