JavaScript · Middle · Question 24 of 75
In what order are the lines printed?
async function f() {
console.log("A");
await null;
console.log("B");
}
f();
console.log("C");- ✓Correct answer:
A C B - 2
A B C - 3
C A B
Explanation
An async function's body runs synchronously until the first await. The rest continues as a microtask after the current synchronous code finishes. So first A, then C, then B.