Last active
March 7, 2020 21:25
-
-
Save jbmilgrom/afd14da5882601cab6509fbaed7ccca4 to your computer and use it in GitHub Desktop.
Subsequent calls to withdraw with the same argument produce different results
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 = makeBankAccount(100); | |
bankAccount.checkBalance(); // 100 | |
bankAccount.withdraw(20); | |
bankAccount.checkBalance(); // 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment