Created
December 16, 2016 14:58
-
-
Save SteGriff/36200a1ec6885cadc8c3faa87cccd772 to your computer and use it in GitHub Desktop.
A javascript callback puzzle, or, why we prefer Promises to Callbacks
This file contains hidden or 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
| function a(callback) | |
| { | |
| console.log("a"); | |
| callback(); | |
| } | |
| function b(callback) | |
| { | |
| console.log("b"); | |
| callback(); | |
| } | |
| function c() | |
| { | |
| console.log("c"); | |
| } | |
| a(b(c)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment