Last active
January 26, 2019 06:38
-
-
Save irridescentrambler/361dc08eda104cb56133127cb0f087fb 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
let promise1 = new Promise((resolve, reject) => { | |
setInterval(() => { | |
resolve("Resolved the promise"); | |
}, 10000) | |
}); | |
// promise.then(callback_for_resolved, callback_for_rejected) | |
promise1.then( | |
(successResponse) => { | |
console.log(successResponse); | |
}, | |
(errorResponse) => { | |
console.log(errorResponse) | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment