Interview Q&A / Node.js

INTERVIEW Q&A · 68 QUESTIONS

Node.js interview questions

The event loop on the server, streams, modules and building APIs with Express.

  1. What happens when you run a heavy CPU loop inside a Node.js request handler?

    The single JavaScript thread is busy, so the event loop cannot serve any other request until the loop ends. Every user sees delays. Move heavy work to worker threads, a queue, or break it into chunks.

    BeginnerQuick answer1 min read