---
title: "Async JavaScript: Promises, Async/Await, Event Loop"
lang: "en"
author: "Mohammad Abu Mattar"
canonical: https://mkabumattar.com/post/async-javascript-promises-quiz
---

[Home](/)›[Quizzes](/quizzes)›[All Categories](/quizzes/categories)›[Backend](/quizzes/categories/backend)

Quizzes

[Next in BackendDatabase Design & Patterns](/quizzes/post/database-design-patterns-quiz)

[Backend](/quizzes/categories/backend)[JavaScript](/quizzes/categories/javascript)

# Async JavaScript: Promises, Async/Await, Event Loop

[Mohammad Abu Mattar](/authors/mohammad-abu-mattar)20 QuestionsIntermediatePublished: 12 Mar 2026

[Markdown for AI(opens in a new tab)](/post/async-javascript-promises-quiz/index.md "Open the plain-Markdown version of this page, for pasting into an AI tool")

Series

[Advanced Frontend Techniques](/series/advanced-frontend-techniques)3/4

[PreviousAdvanced CSS: Layouts, Modern Features & Performance](/quizzes/post/advanced-css-layouts-quiz)[NextAdvanced Frontend Patterns: State Management & Performance](/quizzes/post/advanced-frontend-patterns-quiz)

All posts in this series (4)

Quizzes4

1.  [Responsive Web Design: Mobile-First & Breakpoints](/quizzes/post/responsive-design-quiz)
2.  [Advanced CSS: Layouts, Modern Features & Performance](/quizzes/post/advanced-css-layouts-quiz)
3.  [Async JavaScript: Promises, Async/Await, Event LoopYou are here](/quizzes/post/async-javascript-promises-quiz)
4.  [Advanced Frontend Patterns: State Management & Performance](/quizzes/post/advanced-frontend-patterns-quiz)

## Async JavaScript: Promises, Async/Await, Event Loop

Up to 20 questions, shuffled on every run

Quiz Configuration

Enterto start

Welcome to the Async JavaScript quiz! Test your knowledge of Promises, async/await, the event loop, and advanced concurrency patterns. Each question has a hint and detailed explanations for all options. Good luck!

Answer key and explanations20 questions

The quiz above draws 20 questions at random from these 30, so a second attempt will not be the same run. Everything in the pool is listed here.

1.  What is the JavaScript event loop?
    
    AnswerThe mechanism that monitors the call stack and moves tasks from the callback queue to the stack
    
2.  What is a callback function?
    
    AnswerA function passed into another function as an argument to be executed at a later time
    
3.  What is callback hell?
    
    AnswerA situation where deeply nested callbacks make code difficult to read and manage errors
    
4.  What is a Promise?
    
    AnswerAn object representing the eventual completion or failure of an asynchronous operation
    
5.  What does Promise.resolve() do?
    
    AnswerReturns a Promise object that is resolved with a specified value or result
    
6.  What does Promise.reject() do?
    
    AnswerReturns a Promise object that is rejected with a given reason or error message
    
7.  What is an async function?
    
    AnswerA function that always returns a Promise and allows the use of the await keyword
    
8.  What is the purpose of the await keyword?
    
    AnswerPauses the execution of an async function until a Promise settles and returns its result
    
9.  How does Promise.all() behave?
    
    AnswerFulfills when all input Promises fulfill, but rejects immediately if any Promise rejects
    
10.  What is the behavior of Promise.race()?
     
     AnswerReturns a Promise that settles as soon as any of the input Promises fulfill or reject
     
11.  What is the microtask queue?
     
     AnswerA high-priority queue for Promises and MutationObservers processed before the next macrotask
     
12.  How does setTimeout interact with the event loop?
     
     AnswerIt schedules a callback to be executed as a macrotask after the current stack and microtasks
     
13.  What is error handling with async/await?
     
     AnswerThe use of try/catch blocks to capture and handle errors from awaited Promises
     
14.  What is the use case for Promise.allSettled()?
     
     AnswerWhen you need to wait for all operations to complete regardless of their individual success or failure
     
15.  What is the behavior of Promise.any()?
     
     AnswerIt returns the first Promise that fulfills, and only rejects if every input Promise rejects
     
16.  What is the role of the Promise constructor?
     
     AnswerIt creates a new Promise where an executor function manually controls the resolve and reject calls
     
17.  What is Promise chaining?
     
     AnswerA pattern where each .then() returns a new Promise, allowing for sequential async operations
     
18.  What is the unhandledrejection event?
     
     AnswerA global event fired when a Promise is rejected and no rejection handler is attached to it
     
19.  What is the AbortController API?
     
     AnswerAn interface that allows you to abort one or more Web requests or asynchronous operations
     
20.  What is the primary function of the Fetch API?
     
     AnswerA modern, Promise-based interface for making network requests and handling responses
     
21.  What is an async iterator?
     
     AnswerAn object that implements the Symbol.asyncIterator method for use with for-await-of loops
     
22.  What is the difference between concurrent and sequential execution?
     
     AnswerConcurrent runs independent tasks in parallel; sequential waits for each task to finish before starting the next
     
23.  What is top-level await?
     
     AnswerThe ability to use the await keyword at the highest level of a module without an async function
     
24.  What is async context preservation?
     
     AnswerEnsuring that "this" and other closure variables remain accessible across asynchronous boundaries
     
25.  What is the retry pattern in asynchronous code?
     
     AnswerA strategy of wrapping async calls in a loop with error handling and exponential backoff
     
26.  What is a typical use case for Promise.allSettled()?
     
     AnswerHandling a batch of independent operations where partial success is acceptable and results must be tracked
     
27.  What is the purpose of debouncing an asynchronous operation?
     
     AnswerTo limit the rate at which a function executes by waiting for a period of inactivity before triggering
     
28.  How is Promise.then() return value transformed?
     
     AnswerIf the handler returns a value, the new Promise resolves to that value; if it returns a Promise, it waits for it
     
29.  What are asynchronous cleanup patterns?
     
     AnswerUsing try/finally blocks to ensure that resources like timers and connections are closed regardless of success
     
30.  What are generator functions?
     
     AnswerFunctions that can be exited and later re-entered, with their context preserved across multiple re-entries
     

## Tags

[#Async](/quizzes/tags/async)[#JavaScript](/quizzes/tags/javascript)[#Promises](/quizzes/tags/promises)

## Share

[Facebook](https://facebook.com/sharer/sharer.php?u=https%3A%2F%2Fmkabumattar.com%2Fquizzes%2Fpost%2Fasync-javascript-promises-quiz "Share on Facebook")[Twitter](https://twitter.com/intent/tweet/?text=Async%20JavaScript%3A%20Promises%2C%20Async%2FAwait%2C%20Event%20Loop&url=https%3A%2F%2Fmkabumattar.com%2Fquizzes%2Fpost%2Fasync-javascript-promises-quiz "Share on Twitter")[LinkedIn](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fmkabumattar.com%2Fquizzes%2Fpost%2Fasync-javascript-promises-quiz&title=Async%20JavaScript%3A%20Promises%2C%20Async%2FAwait%2C%20Event%20Loop&summary=Master%20asynchronous%20JavaScript%3A%20callbacks%2C%20Promises%2C%20async%2Fawait%2C%20event%20loop%2C%20microtasks.%20Essential%20for%20modern%20backend%20and%20frontend%20development.&source=https://mkabumattar.com "Share on LinkedIn")[WhatsApp](https://wa.me/?text=Async%20JavaScript%3A%20Promises%2C%20Async%2FAwait%2C%20Event%20Loop%20https%3A%2F%2Fmkabumattar.com%2Fquizzes%2Fpost%2Fasync-javascript-promises-quiz "Share on WhatsApp")[Telegram](https://t.me/share/url?url=https%3A%2F%2Fmkabumattar.com%2Fquizzes%2Fpost%2Fasync-javascript-promises-quiz&text=Async%20JavaScript%3A%20Promises%2C%20Async%2FAwait%2C%20Event%20Loop "Share on Telegram")[Reddit](https://www.reddit.com/submit?url=https%3A%2F%2Fmkabumattar.com%2Fquizzes%2Fpost%2Fasync-javascript-promises-quiz&title=Async%20JavaScript%3A%20Promises%2C%20Async%2FAwait%2C%20Event%20Loop "Share on Reddit")[Hacker News](http://news.ycombinator.com/submitlink?u=https%3A%2F%2Fmkabumattar.com%2Fquizzes%2Fpost%2Fasync-javascript-promises-quiz&t=Async%20JavaScript%3A%20Promises%2C%20Async%2FAwait%2C%20Event%20Loop "Share on Hacker News")[Pinterest](https://pinterest.com/pin/create/button/?url=https%3A%2F%2Fmkabumattar.com%2Fquizzes%2Fpost%2Fasync-javascript-promises-quiz&media=&description=Master%20asynchronous%20JavaScript%3A%20callbacks%2C%20Promises%2C%20async%2Fawait%2C%20event%20loop%2C%20microtasks.%20Essential%20for%20modern%20backend%20and%20frontend%20development. "Share on Pinterest")[Email](<mailto:?subject=Async%20JavaScript%3A%20Promises%2C%20Async%2FAwait%2C%20Event%20Loop&body=Check out this article: https%3A%2F%2Fmkabumattar.com%2Fquizzes%2Fpost%2Fasync-javascript-promises-quiz>)

## Comments

Was this useful?

## You might also enjoy

More posts on similar topics

[![Advanced CSS: Layouts, Modern Features & Performance](/_astro/hero.DDVZErcE_10pL0d.webp)](/quizzes/post/advanced-css-layouts-quiz)

## [Advanced CSS: Layouts, Modern Features & Performance](/quizzes/post/advanced-css-layouts-quiz)

-   [Mohammad Abu Mattar](/authors/mohammad-abu-mattar)
-   [Web Design](/quizzes/categories/web-design)
-   [Frontend](/quizzes/categories/frontend)

Welcome to the Advanced CSS Quiz! Test your knowledge of modern CSS features, layout techniques, and performance optimization. This quiz covers CSS Grid, custom properties, animations, transforms, and

[#CSS](/quizzes/tags/css)[#Layouts](/quizzes/tags/layouts)[#Performance](/quizzes/tags/performance)

[read more](/quizzes/post/advanced-css-layouts-quiz)

[![Advanced Frontend Patterns: State Management & Performance](/_astro/hero.SWD1oABZ_ZdB6Yy.webp)](/quizzes/post/advanced-frontend-patterns-quiz)

## [Advanced Frontend Patterns: State Management & Performance](/quizzes/post/advanced-frontend-patterns-quiz)

-   [Mohammad Abu Mattar](/authors/mohammad-abu-mattar)
-   [Frontend](/quizzes/categories/frontend)
-   [Performance](/quizzes/categories/performance)

Master advanced frontend architecture: state management (Redux, Zustand), performance optimization, code splitting, lazy loading, and responsive design patterns.

[#Frontend](/quizzes/tags/frontend)[#Performance](/quizzes/tags/performance)[#Architecture](/quizzes/tags/architecture)

[read more](/quizzes/post/advanced-frontend-patterns-quiz)

[![Responsive Web Design: Mobile-First & Breakpoints](/_astro/hero.Dy4gx6ye_Z2uxxRs.webp)](/quizzes/post/responsive-design-quiz)

## [Responsive Web Design: Mobile-First & Breakpoints](/quizzes/post/responsive-design-quiz)

-   [Mohammad Abu Mattar](/authors/mohammad-abu-mattar)
-   [Web Design](/quizzes/categories/web-design)
-   [CSS](/quizzes/categories/css)
-   [Frontend](/quizzes/categories/frontend)

Welcome to the Responsive Design Quiz! Most traffic now arrives on a phone, so a layout has to hold up on any screen size. This quiz will test your knowledge of responsive design principles, including

[#Responsive Design](/quizzes/tags/responsive-design)[#Mobile First](/quizzes/tags/mobile-first)[#Media Queries](/quizzes/tags/media-queries)+2 tags

[read more](/quizzes/post/responsive-design-quiz)

[![JavaScript: Language Fundamentals & Modern Features](/_astro/hero.CPnUQqYa_cqDLj.webp)](/quizzes/post/javascript-fundamentals-quiz)

## [JavaScript: Language Fundamentals & Modern Features](/quizzes/post/javascript-fundamentals-quiz)

-   [Mohammad Abu Mattar](/authors/mohammad-abu-mattar)
-   [JavaScript](/quizzes/categories/javascript)
-   [Programming](/quizzes/categories/programming)
-   [Web Development](/quizzes/categories/web-development)
-   [Frontend](/quizzes/categories/frontend)

Welcome to the JavaScript Basics Quiz! This quiz tests your understanding of fundamental JavaScript concepts, syntax, and modern programming best practices. Each question is multiple-choice, and you'l

[#JavaScript](/quizzes/tags/javascript)[#ES6](/quizzes/tags/es6)[#Arrow Functions](/quizzes/tags/arrow-functions)+6 tags

[read more](/quizzes/post/javascript-fundamentals-quiz)

[![Database Design & Patterns](/_astro/hero.C_gmtZ96_ZtTczJ.webp)](/quizzes/post/database-design-patterns-quiz)

## [Database Design & Patterns](/quizzes/post/database-design-patterns-quiz)

-   [Mohammad Abu Mattar](/authors/mohammad-abu-mattar)
-   [Backend](/quizzes/categories/backend)
-   [Database](/quizzes/categories/database)

Welcome to the Database Design & Patterns Quiz! Test your knowledge on database normalization, indexing, query optimization, ACID properties, sharding, replication, and more. Each question has a hint

[#Database](/quizzes/tags/database)[#Design](/quizzes/tags/design)[#Performance](/quizzes/tags/performance)

[read more](/quizzes/post/database-design-patterns-quiz)

[![Production Backend: Scaling, Monitoring & Reliability](/_astro/hero.BMX8nk1k_Z292ED3.webp)](/quizzes/post/production-backend-scaling-quiz)

## [Production Backend: Scaling, Monitoring & Reliability](/quizzes/post/production-backend-scaling-quiz)

-   [Mohammad Abu Mattar](/authors/mohammad-abu-mattar)
-   [Backend](/quizzes/categories/backend)
-   [DevOps](/quizzes/categories/devops)

Welcome to the "Production Backend: Scaling, Monitoring & Reliability" quiz! This quiz tests your knowledge of key concepts and best practices for running production backend systems at scale. You'll b

[#Production](/quizzes/tags/production)[#Backend](/quizzes/tags/backend)[#Scaling](/quizzes/tags/scaling)

[read more](/quizzes/post/production-backend-scaling-quiz)

6 related posts
