INTERVIEW QUESTIONS

Node.js Interview Questions

Practice Node.js prompts by theme and build clearer interview answers.

Practice by topicRole and skill lensesClear answer prompts

Showing 52 practice prompts

✦

NODE.JS

What is Node.js and how does it execute JavaScript outside the browser?

Node.js is an open-source, cross-platform JavaScript runtime environment built on Google Chrome's V8 JavaScript engine. It executes JavaScript outside the browser by combining V8 with libuv (a C library providing asynchronous I/O, event loops, and thread pools) and native C++ bindings for OS-level access to the file system, network sockets, and processes.
CompanyGoogle◦ Architecture
✦

NODE.JS

What is libuv and what role does it play in Node.js?

libuv is a multi-platform support library written in C that powers the Node.js event-driven architecture. It provides the event loop, cross-platform asynchronous I/O abstractions (epoll on Linux, kqueue on macOS, IOCP on Windows), DNS resolution, child process management, and a background thread pool (default 4 threads) for blocking system tasks.
CompanyNetflix◦ Architecture
✦

NODE.JS

What is non-blocking asynchronous I/O in Node.js?

Non-blocking I/O means system operations (like reading from disk or querying a database) return immediately without pausing execution of the main JavaScript thread. When the I/O operation completes in the background, a callback or Promise is scheduled onto the event loop queue, allowing Node.js to handle thousands of concurrent connections on a single thread.
CompanyAmazon◦ Event Driven I/O
✦

NODE.JS

What is the difference between process.nextTick() and setImmediate()?

'process.nextTick()' fires immediately after the currently executing JavaScript operation finishes, before the event loop advances to any other phase. 'setImmediate()' queues a callback to run in the 'Check' phase of the event loop after the Poll phase. Calling nextTick recursively can starve the event loop of I/O.
CompanyMeta◦ Event Loop
✦

NODE.JS

What are Streams in Node.js and what are the four primary types?

Streams are collections of data that are read from or written to piece by piece (chunk by chunk) rather than fitting all data into memory at once. The four types are: 1) Readable (e.g., fs.createReadStream), 2) Writable (e.g., fs.createWriteStream), 3) Duplex (e.g., net.Socket), and 4) Transform (e.g., zlib.createGzip).
CompanyMicrosoft◦ Streams
…

Your next interview is closer than you think.

Practice smarter and land better opportunities.

✓ Start with the free plan✓ No credit card✓ Cancel anytime
Start preparing free