Last active
August 29, 2015 14:14
-
-
Save raribeiro/b159c1b669746659fe63 to your computer and use it in GitHub Desktop.
Pure promise witch javascript.
This file contains 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 promise = new Promise(function(resolve){ | |
var foo; | |
resolve(foo=1);//event | |
}); | |
promise.then(function(){ | |
//Execute on done | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment