What is the correct execution order of: console.log('A'); setTimeout(() => console.log('B'), 0); Promise.resolve().then(() => console.log('C')); console.log('D');
Answer options
A
A, B, C, D
B
A, D, B, C
C
A, D, C, B
D
A, C, D, B
Correct answer: A, D, C, B
Detailed Solution & Conceptual Analysis
This question has been retained as-is due to its unique context.
Key Engineering Takeaway
In Web Technology, understanding the underlying mechanics of JavaScript is critical for writing performant, bug-free production code and passing rigorous technical architecture reviews.