Skip to content

Instantly share code, notes, and snippets.

@kunigami
Created May 10, 2017 17:18
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save kunigami/632ff84ae4f5f6cc6f83f78f571babb4 to your computer and use it in GitHub Desktop.
function a() {
console.log('a before b');
b();
console.log('a after b');
}
function b() {
setTimeout(c, 0);
}
function c() {
console.log('c');
}
// Running this in node.js outputs
// a before b
// a after b
// c
a();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment