Guest User

Untitled

a guest
Jul 15th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. const firstPromise = new MyPromise((resolve, reject) => {
  2. console.log('RUNNING THE EXECUTOR FUNCTION');
  3. // imagine if this were an api call, that took a second
  4. // to respond with 'wubadubdub'
  5. setTimeout(() => resolve('wubadubdub'), 1000);
  6. });
  7.  
  8. firstPromise.then(successMessage => console.log(`wahoo ${successMessage}`));
Add Comment
Please, Sign In to add comment