easy5 pts · first answer countsjavascriptevent-loop
Timer vs promise order
What does this code print, in order?
console.log('A')
setTimeout(() => console.log('B'), 0)
Promise.resolve().then(() => console.log('C'))
console.log('D')Discussion 0
Join free to post in the discussion.
Related questions
- fetch and error status codesFull Stack Developer
- try/catch around an async callFull Stack Developer
- map with an async callbackFull Stack Developer
- Dates sent through JSONFull Stack Developer
- One report slows every requestFull Stack Developer
- Birthday shows one day earlyFull Stack Developer
- Large IDs change in the browserFull Stack Developer
- Block scope of letFrontend Developer