フリー問題

Salesforce Certified JavaScript Developer のフリー問題 15 / 20 問目

問題文

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?

選択肢

  1. Remove both await keywords and read the two results directly from the returned objects.
  2. Start both calls first and await the combined promise, so the two waits overlap.
  3. 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.
  4. 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.

解答・解説を確認するには

正解と解説の確認、回答の記録には無料登録が必要です。登録すると演習モードでフリー問題に回答し、正誤と解説をその場で確認できます。