SHARE
TWEET

Untitled

a guest Aug 14th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let prom = new Promise(res => {
  2.   console.log('A')
  3.   setTimeout(res,1000)
  4. })
  5.  
  6. prom.then(res => {
  7.   console.log('B')
  8. })
  9.  
  10. console.log('C')
  11.  
  12. // A
  13. // C
  14. // B
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top