Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. console.log("Sycnhronous 1");
  2.  
  3. setTimeout(()=> console.log("Timeout 2"), 0);
  4.  
  5. Promise.resolve().then(()=> console.log("Promise 3"));
  6.  
  7. console.log("Synchronous 4")
  8.  
  9. // OUTPUT
  10. // Sycnhronous 1
  11. // Sycnhronous 4
  12. // Promise 3
  13. // Timeout 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement