Created
April 7, 2015 11:51
-
-
Save joepie91/98576de0fab7badec167 to your computer and use it in GitHub Desktop.
Predictable sync vs. async in Node.js
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
var i = 0; | |
maybeSyncMaybeAsync(function(){ | |
i++; | |
}); | |
console.log("The value of i is", i); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
to make this into a runnable example - async and sync versions of the function could be added -