EventEmitter Counter

Medium
3 views 25 Jan 2026
Use EventEmitter to count events and print the total....

Promise Chain Order

Hard
4 views 25 Jan 2026
Show the execution order between sync code, Promise.then, and setTimeout....

Async/Await Try Catch

Medium
3 views 25 Jan 2026
Call an async function that can throw and handle it cleanly....

Parallel Promises

Medium
3 views 25 Jan 2026
Run two promises in parallel with Promise.all and print combined result....

Timeout With Promise.race

Hard
4 views 25 Jan 2026
Add a timeout wrapper for an async task using Promise.race....

Retry With Backoff

Hard
4 views 25 Jan 2026
Retry a failing async function 3 times with small delays....

Queue Tasks One By One

Medium
4 views 25 Jan 2026
Process async tasks in order (not parallel) and print final array....

AbortController With Fetch

Hard
3 views 25 Jan 2026
Cancel a fetch request using AbortController and print ABORTED....

Event Loop Starvation

Hard
5 views 25 Jan 2026
Show how a long sync loop blocks timers (print before and after)....

Custom Delay Function

Easy
4 views 25 Jan 2026
Create a delay(ms) promise and use it with await....

nextTick vs setImmediate

Hard
4 views 25 Jan 2026
Print the order between process.nextTick and setImmediate....

EventEmitter once()

Medium
4 views 25 Jan 2026
Listen to an event only once and print count....

Promisify Callback API

Medium
7 views 25 Jan 2026
Convert a callback-style function to promise using util.promisify....

Concurrency Limit Pool

Hard
4 views 25 Jan 2026
Run tasks with max 2 concurrency and print completion order....

Async Generator Basics

Hard
3 views 25 Jan 2026
Create an async generator that yields values with delay....

Debounce Function

Medium
5 views 25 Jan 2026
Build a debounce(fn, ms) and show it only calls once....

Stop Interval After N

Easy
4 views 25 Jan 2026
Run setInterval and stop after 3 ticks, print count....

Handle SIGTERM Async Cleanup

Hard
4 views 25 Jan 2026
Handle SIGTERM, wait for cleanup promise, then exit....

Task Queue With setImmediate

Hard
4 views 25 Jan 2026
Process an array of tasks without blocking the event loop....

Microtask With Promise.resolve

Easy
5 views 25 Jan 2026
Queue a microtask using Promise.resolve().then and print order....