Advertisement
whoisYeshua

Event Loop Advanced 2

Jun 15th, 2023
901
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. console.log(1);
  2. setTimeout(() => console.log(2));
  3. Promise.reject(3).catch(console.log);
  4. new Promise(resolve => setTimeout(resolve)).then(() => console.log(4));
  5. Promise.resolve(5).then(console.log);
  6. console.log(6);
  7. queueMicrotask(() => console.log(7))
  8. setTimeout(() => console.log(8),0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement