Created
April 24, 2020 20:27
-
-
Save jordangarcia/2ba18a5009f6e5b8bf02390f0e2e7f71 to your computer and use it in GitHub Desktop.
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
const promise = new Promise2((resolve, reject) => { | |
setTimeout(() => { | |
resolve('hello') | |
}, 500) | |
}) | |
promise.then((value) => { | |
console.log(value) | |
}) | |
// we want .then(resolveHandler, rejectHandler) | |
// chaining is not necessary for now | |
// static methods arent necessary Promise.resolve / Promise.reject |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment