When is the body of a Promise constructor callback executed?
Immediately, yes, by specification. From the MDN: The executor function is executed immediately by the Promise implementation, passing resolve and reject functions (the executor is called before the Promise constructor even returns the created object) This is defined in the ECMAScript specification (of course, it’s harder to read…) here (Step 9 as of this edit, showing … Read more