Created
November 25, 2015 11:04
-
-
Save jpina/1304a135cfea147a2014 to your computer and use it in GitHub Desktop.
02 How to use a promise
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
promise.then(function(result) { | |
console.log(result); // "Stuff worked!" | |
}, function(err) { | |
console.log(err); // Error: "It broke" | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment