Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up

Node.js interviews test whether you understand the single-threaded, non-blocking model and its consequences. Expect questions on the event loop phases, the difference between process.nextTick and setImmediate, streams and backpressure, error handling across callbacks, promises and EventEmitters, and how to scale across CPU cores. Employers also probe production experience: memory leaks, blocking the event loop, and securing an API. The questions below cover the runtime, the Express layer and the operational concerns.

NodeJS MCQ

1.What is Node.js?

2.Which queue has the highest priority in Node.js?

3.In which event loop phase do setImmediate callbacks execute?

4.Which of these is NOT a type of Node.js stream?

5.Why is stream.pipeline() preferred over stream.pipe()?

6.What does the error-first callback convention mean?

8.What is the purpose of package-lock.json?

9.What is the difference between npm install and npm ci?

10.Which Express middleware signature identifies an error handler?

11.What happens if an Express middleware does not call next() or send a response?

13.What does the cluster module do?

14.Which of these blocks the Node.js event loop?

15.What is the correct way to handle an unhandled promise rejection at process level?

16.In CommonJS, what does module.exports do?

17.Which statement about ES modules in Node.js is correct?

18.What is the EventEmitter class used for?

19.What does the process.env object contain?

20.Which npm field lists packages needed only during development?

21.What is middleware in Express?

22.Which HTTP status code should a successful POST that creates a resource return?

23.What does the __dirname variable hold in CommonJS?

24.Which approach best protects a Node.js API against NoSQL injection?

25.What is the purpose of the helmet package in Express?

26.What does backpressure mean in the context of streams?

27.Which of these correctly reads a file asynchronously using promises?

28.What is a Buffer in Node.js?

29.Which tool would you use to find a memory leak in a Node.js process?

30.What does the exports shorthand refer to in CommonJS?

31.Which of these is the correct way to handle errors in an async Express 4 route handler?

32.What is the difference between operational and programmer errors?

34.What does the CORS mechanism control?

36.Which of these describes the poll phase of the event loop?

37.What does the npm audit command do?

38.Which statement about JWT authentication is correct?

39.What is the purpose of a dead letter queue when consuming messages?

40.Why should message consumers be idempotent?

41.Which of these best describes Node.js's concurrency model?

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as