0
how is the control flowing in below code?
https://code.sololearn.com/WJpBXcYtBAzb/# how flag3 is printed after flag2. I didn't understand the control flow here.
1 Answer
+ 2
The callback queue is where a Promise's result is stored. Once the call stack is empty, the callback queue places the next available call, if any.
The console.log calls are running on the call stack.