Created
June 23, 2015 14:17
-
-
Save mrlannigan/f3e861f5e4471c82b9f9 to your computer and use it in GitHub Desktop.
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 BPromise = require('bluebird'); | |
var prom = new BPromise(function (resolve, reject) { | |
console.log(1); | |
resolve(3); | |
console.log(2); | |
}).then(function (num) { | |
console.log(num); | |
}); |
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
$ node test.js | |
1 | |
2 | |
3 |
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 BPromise = require('bluebird'); | |
var prom = new BPromise(function (resolve, reject) { | |
console.log(1); | |
return resolve(3); | |
console.log(2); | |
}).then(function (num) { | |
console.log(num); | |
}); |
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
$ node test.js | |
1 | |
3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment