JavaScript Async Await Interview Questions 2026: 26 Q&A
26 JavaScript async await and promise interview questions for 2026 with full answers, the event loop, error handling, Promise.all vs allSettled and predict-the-output snippets. Candidate-reported frontend and Node favourites.
on this page§ 09
Last Updated: June 2026 | Level: Freshers to Mid-Level | Read Time: ~16 min
Asynchronous JavaScript separates juniors from mid-level developers in interviews. Candidates report that the event loop, promise combinators, and async error handling are guaranteed for frontend and Node roles. This guide covers 26 async questions with full answers, runnable code, and predict-the-output traps. Behaviour reflects the official MDN documentation; confirm any event-loop nuance on MDN, since ordering questions hinge on a single rule.
Pair this with JavaScript Interview Questions for Freshers 2026 and JavaScript Output Questions 2026.
Table of Contents
- Promises Basics (Q1 to Q9)
- async await (Q10 to Q17)
- Event Loop and Ordering (Q18 to Q22)
- Error Handling and Combinators (Q23 to Q26)
- Predict the Output
- Quick Revision Table
- Frequently Asked Questions
Promises Basics
Q1. What is a promise? Easy
Q2. What are the states of a promise? Easy
Q3. What is the difference between a callback and a promise? Medium
Q4. What does Promise.resolve do? Easy
Q5. How does promise chaining work? Medium
fetchUser()
.then(u => fetchOrders(u.id))
.then(orders => render(orders))
.catch(err => showError(err));
Q6. What does returning a value vs a promise from then do? Medium
Q7. What is promise flattening? Hard
Q8. What does .finally do? Easy
Q9. Can you cancel a promise? Hard
async await
Q10. What is async await? Easy
Q11. What does an async function return? Medium
Q12. What does await actually do? Medium
Q13. How do you run async operations in parallel? Medium
const [a, b] = await Promise.all([fetchA(), fetchB()]); // parallel
Q14. What is the cost of sequential awaits? Medium
Q15. Can you use await at the top level? Medium
Q16. What happens if you forget to await a promise? Hard
Q17. How do you await inside a loop correctly? Hard
Event Loop and Ordering
Q18. What is the event loop? Medium
Q19. What is the difference between microtasks and macrotasks? Hard
Q20. Why does a promise callback run before setTimeout(0)? Hard
Q21. What is queueMicrotask? Medium
Q22. Does await block the thread? Hard
Error Handling and Combinators
Q23. How do you handle errors with async await? Medium
async function load() {
try { return await fetchData(); }
catch (e) { return fallback; }
}
Q24. What is the difference between Promise.all and Promise.allSettled? Hard
Q25. What do Promise.race and Promise.any do? Hard
Q26. Why can a synchronous try/catch miss a promise rejection? Hard
Predict the Output
Snippet 1
console.log("1");
setTimeout(() => console.log("2"), 0);
Promise.resolve().then(() => console.log("3"));
console.log("4");
Output:
1
4
3
2
Why: Sync first (1, 4), then microtask (3), then macrotask (2).
Snippet 2
async function f() {
console.log("a");
await Promise.resolve();
console.log("b");
}
console.log("start");
f();
console.log("end");
Output:
start
a
end
b
Why: Code up to the await runs synchronously; the continuation is a microtask after the current stack clears.
Snippet 3
Promise.all([
Promise.resolve(1),
Promise.reject("x"),
Promise.resolve(3)
]).then(console.log).catch(e => console.log("caught", e));
Output:
caught x
Why: Promise.all rejects on the first rejection, so the catch fires with "x" and the resolved values are discarded.
Quick Revision Table
| Concept | Key takeaway |
|---|---|
| Promise states | pending, fulfilled, rejected |
| async returns | always a promise |
| await | unwraps and yields a microtask |
| parallel | Promise.all, not sequential awaits |
| microtask vs macrotask | promises before setTimeout |
| all vs allSettled | reject early vs wait for all |
| race vs any | first settle vs first success |
Frequently Asked Questions
What async question is most asked in 2026?
Candidates report the event-loop ordering of synchronous code, microtasks, and macrotasks, plus the difference between Promise.all and Promise.allSettled, are the two most repeated async questions across frontend and Node interviews.
Is async await just syntax sugar over promises?
Yes. An async function returns a promise and await pauses until a promise settles, but it does not change the underlying event loop. Understanding that await yields a microtask is what interviewers test.
How do I handle errors with async await?
Wrap awaits in try/catch, or attach .catch to the returned promise. A common bug is expecting a synchronous try/catch to catch an unawaited rejected promise, which it cannot.
Why are sequential awaits slow?
Each await waits for its operation before the next starts, so durations add up. If the operations are independent, fire them together and use Promise.all so they overlap and the total is roughly the slowest one.
What is the difference between Promise.race and Promise.any?
race settles with the first promise to settle, whether fulfilled or rejected, while any fulfils with the first success and only rejects if every promise rejects. Use any for first-success-wins logic.
Related Articles
- JavaScript Interview Questions for Freshers 2026, the master set
- JavaScript Output Questions 2026, event-loop traps
- JavaScript Closures Interview Questions 2026, closures in depth
- JavaScript Coding Questions With Solutions 2026, solved problems
Confirm any event-loop or promise detail on the official MDN documentation before your interview. This guide reflects candidate-reported patterns and public preparation resources as of June 2026.
Sources and review notesreviewed 8 Jun 2026
Official notices, candidate reports, offer documents, and editorial practice questions carry different confidence levels. The visible source list lets you inspect the evidence instead of relying on a blanket verification badge.
topic cluster
More resources in Interview Questions
Use the category hub to browse similar questions, exam patterns, salary guides, and preparation resources related to this topic.
paid contributor programme
Sat this this year? Share your story, earn ₹500.
First-person experience reports help future candidates prep smarter. We pay verified contributors ₹500 via UPI per accepted story with byline.
Submit your story →ready to practice?
Take a free timed mock test
Put what you learned into practice. Our mock tests match the 2026 pattern with timer, navigator, reveal, and score breakdown. No signup.