Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const firstPromise = new MyPromise((resolve, reject) => {
- console.log('RUNNING THE EXECUTOR FUNCTION');
- // imagine if this were an api call, that took a second
- // to respond with 'wubadubdub'
- setTimeout(() => resolve('wubadubdub'), 1000);
- });
- firstPromise.then(successMessage => console.log(`wahoo ${successMessage}`));
Add Comment
Please, Sign In to add comment