Node.js interview practice.
Rehearse with explained interview questions. Describe the mechanism, trace an example, and explain a trade-off before revealing the answer.
How to use this session
- Choose a level and session length. Try each prompt before opening the notes.
- Compare your explanation with the source answer and revisit any concept you missed.
- Mark the questions you reviewed. Sign in to save session history; your draft answers stay in this page.
Code is provided for reading and tracing. These sessions do not execute or automatically grade code.
Node.js practice
Think first. Reveal second.
Explain your reasoning before opening the notes. A focused session lets you choose your question count; mock rounds follow the original guide.
1 questions match your selection.
Preview the Node.js question pool
- How can Node handle many requests with one JavaScript thread?
Node.js is a JavaScript runtime designed to handle many operations that spend time waiting for I/O. It lets the operating system and supporting runtime facilities wait for work, then runs ready JavaScript callbacks on an event-loop thread. This makes one process useful for many concurrent connections without one JavaScript thread per request.
- What do V8, libuv and the thread pool do?
V8 is the engine that executes JavaScript, while libuv provides the event loop and cross-platform I/O support. The libuv thread pool runs certain operations that would otherwise block, such as many file-system calls. These are separate roles: V8 does not itself manage every network request, and not every async call uses a pool thread.
- What are the main event-loop phases?
The event loop is the scheduling mechanism that decides when ready callbacks can run. Node organizes several categories of callbacks into phases, with separate processing for promise microtasks and next-tick callbacks. A timer delay is a minimum waiting threshold, not a promise of an exact execution time.