Created
January 29, 2018 16:17
-
-
Save binura-g/5c9959ad6b3da71f9d3fcaf4d698b937 to your computer and use it in GitHub Desktop.
Promises example 2
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
const myPromise = new Promise((resolve, reject) => { | |
// do something asynchronous which eventually calls either: | |
// | |
// resolve(someValue); // when fulfilled | |
// or | |
// reject("failure reason"); // upon failure or rejection | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment