interview.practice
Node.js for Absolute Beginners interview questions
Answer aloud before opening each explanation. Focus on the reasoning, not memorized wording.
0/6 saved answers | 6 questions shown
01Why is Node.js effective for I/O-heavy services?RuntimeBeginner
Model answer
It uses non-blocking I/O and an event-driven model.
Why
The process can coordinate many waiting operations without one thread per request.
02How do CommonJS and ES modules differ?ModulesBeginner
Model answer
CommonJS uses require/module.exports; ESM uses import/export and standard module semantics.
Why
Package configuration and file extensions influence which system Node uses.
03What blocks the Node.js event loop?AsyncIntermediate
Model answer
Long synchronous JavaScript or synchronous native operations.
Why
CPU-heavy work delays every request handled by that process.
04Why use streams?StreamsIntermediate
Model answer
They process data incrementally with bounded memory.
Why
Streams support backpressure and are useful for files, HTTP bodies, and transformations.
05What checks belong in an API mutation?SecurityAdvanced
Model answer
Validation, authentication, authorization, safe database access, and rate limiting.
Why
Each request must be treated as untrusted regardless of the client UI.
06When should worker threads be used?ScaleAdvanced
Model answer
For CPU-intensive JavaScript that would otherwise block the event loop.
Why
They are not normally needed for asynchronous network or filesystem I/O.