let ran = false;
new Promise(resolve => { ran = true; resolve(); });
// ran is true immediatelyThe executor function runs synchronously when the Promise is created.
The executor function passed to new Promise() runs immediately and synchronously.
Challenge: Verify that the executor runs synchronously before the constructor returns.