Skip to content

Instantly share code, notes, and snippets.

@bitfishxyz
Created April 29, 2020 04:55
Show Gist options
  • Save bitfishxyz/59e293b956af7def0a5340d11520122f to your computer and use it in GitHub Desktop.
Save bitfishxyz/59e293b956af7def0a5340d11520122f to your computer and use it in GitHub Desktop.
const promise1 = Promise.resolve().then(() => {
console.log('promise1');
const timer2 = setTimeout(() => {
console.log('timer2')
}, 0)
});
const timer1 = setTimeout(() => {
console.log('timer1')
const promise2 = Promise.resolve().then(() => {
console.log('promise2')
})
}, 0)
console.log('start');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment