Skip to content

Instantly share code, notes, and snippets.

@jaw187
Created March 4, 2015 15:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaw187/c7d95786a6a86b71262b to your computer and use it in GitHub Desktop.
Save jaw187/c7d95786a6a86b71262b to your computer and use it in GitHub Desktop.
Example of how the event loop works
var test1 = function () {
var options = {
hostname: 'google.com',
port: 80,
path: '/'
};
http.get(options, function (res) {
console.log('Test 1');
});
};
var test2 = function () {
console.log('Test 2');
};
var test = function () {
test1();
test2();
};
test();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment