Hint
Everything before the first await in an async function runs synchronously.
async function foo() {
console.log('foo start');
await Promise.resolve();
console.log('foo end');
}
console.log('1');
foo();
console.log('2');1 foo start 2 foo end
Explanation: foo() runs synchronously until the first await. The await suspends foo and returns control. "2" prints. Then the microtask resumes foo and prints "foo end".
Key Insight: Everything before the first await in an async function runs synchronously.