Skip to content

Instantly share code, notes, and snippets.

@gsathya
Created February 3, 2017 16:13
Show Gist options
  • Save gsathya/ed2a85be3257337cd0aff5b1b41ae501 to your computer and use it in GitHub Desktop.
Save gsathya/ed2a85be3257337cd0aff5b1b41ae501 to your computer and use it in GitHub Desktop.
gunasekaran@gunasekaran-macbookair ~/code/scratch [8:11:32]
> $ node
> var bluebird = require('bluebird');
undefined
> function f() {
... Promise.resolve().then(() => console.log('1'));
... bluebird.resolve().then(() => console.log('2'));
... Promise.resolve().then(() => console.log('3'));
... }
undefined
> f()
undefined
> 1
3
2
> function f() {
... Promise.resolve().then(() => console.log('1'));
... Promise.resolve().then(() => console.log('2'));
... Promise.resolve().then(() => console.log('3'));
... }
undefined
> f()
undefined
> 1
2
3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment