Skip to content

Instantly share code, notes, and snippets.

@jbmilgrom
Last active January 19, 2020 15:55
Show Gist options
  • Save jbmilgrom/0811905d2b01c9c69f9cec9bfda9cd60 to your computer and use it in GitHub Desktop.
Save jbmilgrom/0811905d2b01c9c69f9cec9bfda9cd60 to your computer and use it in GitHub Desktop.
Methods mutate variables nevertheless
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