Last active
March 7, 2020 21:23
-
-
Save jbmilgrom/354ddff95f72f5ad1d51cc6e00927eb9 to your computer and use it in GitHub Desktop.
Show the use of arrow syntax in maintaining state
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 makeBankAccount = balance => ({ | |
withdraw: amount => balance = balance - amount, | |
checkBalance: () => balance | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment