Created
January 20, 2015 22:24
-
-
Save seanstrom/fd521acf634ae38f49b2 to your computer and use it in GitHub Desktop.
Async JS/Node - Callbacks Not Alway Async Output - Sync
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 endpoint = 'my/endpoint' | |
console.log(1) | |
getData(endpoint, function(err, data) { | |
console.log(2) | |
}) | |
console.log(3) | |
// output 1, 2, 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment