Loading…
A short voice session: one question, one follow-up, then instant feedback — up to 5 minutes.
A Promise is pending, fulfilled, or rejected. await produces its fulfilled value or throws its rejection inside the async function.
A Promise represents a result that may become available later; once settled, it does not switch from fulfilled to rejected or back. An async function returns a Promise. await pauses that function's continuation until the awaited result is settled, without blocking the JavaScript thread while waiting. Handle rejection with try/catch around await or a Promise catch handler. Synchronous work inside an async function still runs on the executing thread.