Skip to content

Instantly share code, notes, and snippets.

@orodio
Created June 6, 2018 18:11
Show Gist options
  • Save orodio/1e1b608f3a533cc2a0a5886e82f8914f to your computer and use it in GitHub Desktop.
Save orodio/1e1b608f3a533cc2a0a5886e82f8914f to your computer and use it in GitHub Desktop.
button.addEventListener('click', () => {
Promise.resolve().then(() => console.log('P1'))
console.log('L1')
})
button.addEventListener('click', () => {
Promise.resolve().then(() => console.log('P2'))
console.log('L2')
})
click button
L1 P1 L2 P2
button.click()
L1 L2 P1 P2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment