Skip to content

Instantly share code, notes, and snippets.

@jozefchutka
Created November 26, 2021 08:33
Show Gist options
  • Select an option

  • Save jozefchutka/409f9edcc7039d22649e4447f8f7bf7e to your computer and use it in GitHub Desktop.

Select an option

Save jozefchutka/409f9edcc7039d22649e4447f8f7bf7e to your computer and use it in GitHub Desktop.
requestAnimationFrame(() => console.log(1));
setTimeout(() => console.log(2), 0);
Promise.resolve().then(() => console.log(3));
requestAnimationFrame(() => console.log(4));
setTimeout(() => console.log(5), 0);
Promise.resolve().then(() => console.log(6));
// 3, 6, 2, 5, 1, 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment