What is the difference between “event loop queue” and “job queue”?

Why “1” is after “b”? The promise specification states that all promise .then() handlers must be called asynchronously after the call stack has emptied. Thus, both a and b, which are executed synchronously on the call stack will execute before any .then() handlers so 1 will always be after a and b. Some interesting reading: … Read more