問題文
Two independent requests each take about one second. The code awaits the first and then awaits the second. How can the total wait be reduced without changing either request?
選択肢
- Remove both await keywords and read the two results directly from the returned objects.
- Start both calls first and await the combined promise, so the two waits overlap.
- Wrap each call in its own async function, because each async function runs on its own thread and the two requests therefore proceed at the same time.
- Move both awaits into a single expression separated by a comma, and the engine then evaluates the two operands together so that the two network round trips overlap.