logo

Crowdly

Browser

Add to Chrome

Що відбудеться при виконанні цього коду? class BankAccount { #balance = 0; ...

✅ 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);

100%
0%
0%
0%
More questions like this

Want instant access to all verified answers on elr.tnpu.edu.ua?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome