Last active
January 19, 2020 15:55
-
-
Save jbmilgrom/0811905d2b01c9c69f9cec9bfda9cd60 to your computer and use it in GitHub Desktop.
Methods mutate variables nevertheless
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const bankAccount = new BankAccount(100); // (this.balance = 100) | |
bankAccount.withdraw(20); // (this.balance = this.balance - 20) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment