The method works out the answer but never gives it back.
Acceptance criteria
- 1.#out should show 150.
The method works out the answer but never gives it back.
class Account { constructor(balance) { this.balance = balance; } deposit(amount) { this.balance += amount; } } const value = new Account(100).deposit(50); document.querySelector('#out').textContent = value === undefined ? "nothing returned" : String(value);
Output ready when you are
Press Run to render your code, or Submit to validate your solution.