Skip to content

Instantly share code, notes, and snippets.

@peaBerberian
Created September 30, 2019 15:10
Show Gist options
  • Save peaBerberian/92da59e2720f2e9aa5aafdf2d3e9729e to your computer and use it in GitHub Desktop.
Save peaBerberian/92da59e2720f2e9aa5aafdf2d3e9729e to your computer and use it in GitHub Desktop.
setTimeout(() => {
console.log("timeout1");
}, 0);
function toto() {
Promise.resolve().then(() => {
console.log("promise2");
});
}
function titi() {
console.log(7);
}
Promise.resolve().then(() => {
console.log("promise1");
});
console.log(4);
toto();
console.log(5);
titi();
Promise.resolve().then(() => {
console.log("promise3");
});
console.log(6);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment