Created
January 24, 2019 19:41
-
-
Save katelynsills/a1cb92d0b59195adbdc01afc3327e512 to your computer and use it in GitHub Desktop.
We use a promise in our finance listener
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 financeListener = { | |
stateChanged(state) { | |
if (state < 4000) { | |
Promise.resolve(bankAccount).then(ba => ba.deposit(1000)); | |
} | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment