フリー問題

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

問題文

A legacy helper takes an error first callback. A team wants to await it. What is the appropriate step?

選択肢

  1. Call the helper inside a loop and read the returned value once the loop finishes.
  2. Mark the helper as async, and adding the keyword makes the engine convert the callback style into a promise automatically.
  3. Wrap the helper in a function that returns a new promise and resolves or rejects it from inside the callback.
  4. Await the helper directly, and await accepts any value and will wait for a callback based function.

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

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