Modules interview questions

18 Modules questions from the Node.js bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.

Free to start: the 2-minute IT readiness check — six questions and a result.

Take the free IT readiness check

or take a mock interview set up for this area

1. What is CommonJS?

Junior
  1. A.exports is just a reference to module.exports, so reassigning exports breaks the link
  2. B.Node's original module system using require() and module.exports, loaded synchronously
  3. C.the absolute directory path of the current CommonJS module
  4. D.Node resolves a bare specifier by walking up parent node_modules directories

Answer + AI explanation with Pro

2. Which term means: "Node's original module system using require() and module.exports, loaded synchronously"?

Junior
  1. A.require resolution
  2. B.CommonJS
  3. C.ES modules in Node
  4. D.__dirname

Answer + AI explanation with Pro

3. Which statement is correct?

Junior
  1. A.CommonJS — the absolute directory path of the current CommonJS module
  2. B.CommonJS — Node's original module system using require() and module.exports, loaded synchronously
  3. C.CommonJS — the entry file a package exposes when it is required by name
  4. D.CommonJS — exports is just a reference to module.exports, so reassigning exports breaks the link

Answer + AI explanation with Pro

4. What is ES modules in Node?

Mid
  1. A.the entry file a package exposes when it is required by name
  2. B.Node's original module system using require() and module.exports, loaded synchronously
  3. C.the absolute directory path of the current CommonJS module
  4. D.import/export support enabled via .mjs or "type":"module", loaded asynchronously

Answer + AI explanation with Pro

5. Which term means: "import/export support enabled via .mjs or "type":"module", loaded asynchronously"?

Mid
  1. A.ES modules in Node
  2. B.__dirname
  3. C.module.exports vs exports
  4. D.require resolution

Answer + AI explanation with Pro

6. Which statement is correct?

Mid
  1. A.ES modules in Node — Node resolves a bare specifier by walking up parent node_modules directories
  2. B.ES modules in Node — the entry file a package exposes when it is required by name
  3. C.ES modules in Node — Node's original module system using require() and module.exports, loaded synchronously
  4. D.ES modules in Node — import/export support enabled via .mjs or "type":"module", loaded asynchronously

Answer + AI explanation with Pro

7. What is module.exports vs exports?

Mid
  1. A.import/export support enabled via .mjs or "type":"module", loaded asynchronously
  2. B.Node's original module system using require() and module.exports, loaded synchronously
  3. C.the entry file a package exposes when it is required by name
  4. D.exports is just a reference to module.exports, so reassigning exports breaks the link

Answer + AI explanation with Pro

8. Which term means: "exports is just a reference to module.exports, so reassigning exports breaks the link"?

Mid
  1. A.require resolution
  2. B.package.json main
  3. C.__dirname
  4. D.module.exports vs exports

Answer + AI explanation with Pro

9. Which statement is correct?

Mid
  1. A.module.exports vs exports — Node resolves a bare specifier by walking up parent node_modules directories
  2. B.module.exports vs exports — Node's original module system using require() and module.exports, loaded synchronously
  3. C.module.exports vs exports — exports is just a reference to module.exports, so reassigning exports breaks the link
  4. D.module.exports vs exports — the absolute directory path of the current CommonJS module

Answer + AI explanation with Pro

10. What is require resolution?

Mid
  1. A.the absolute directory path of the current CommonJS module
  2. B.the entry file a package exposes when it is required by name
  3. C.Node's original module system using require() and module.exports, loaded synchronously
  4. D.Node resolves a bare specifier by walking up parent node_modules directories

Answer + AI explanation with Pro

11. Which term means: "Node resolves a bare specifier by walking up parent node_modules directories"?

Mid
  1. A.require resolution
  2. B.module.exports vs exports
  3. C.__dirname
  4. D.CommonJS

Answer + AI explanation with Pro

12. Which statement is correct?

Mid
  1. A.require resolution — Node resolves a bare specifier by walking up parent node_modules directories
  2. B.require resolution — exports is just a reference to module.exports, so reassigning exports breaks the link
  3. C.require resolution — the absolute directory path of the current CommonJS module
  4. D.require resolution — Node's original module system using require() and module.exports, loaded synchronously

Answer + AI explanation with Pro

13. What is __dirname?

Junior
  1. A.the absolute directory path of the current CommonJS module
  2. B.Node's original module system using require() and module.exports, loaded synchronously
  3. C.exports is just a reference to module.exports, so reassigning exports breaks the link
  4. D.Node resolves a bare specifier by walking up parent node_modules directories

Answer + AI explanation with Pro

14. Which term means: "the absolute directory path of the current CommonJS module"?

Junior
  1. A.__dirname
  2. B.module.exports vs exports
  3. C.CommonJS
  4. D.require resolution

Answer + AI explanation with Pro

15. Which statement is correct?

Junior
  1. A.__dirname — exports is just a reference to module.exports, so reassigning exports breaks the link
  2. B.__dirname — the absolute directory path of the current CommonJS module
  3. C.__dirname — the entry file a package exposes when it is required by name
  4. D.__dirname — import/export support enabled via .mjs or "type":"module", loaded asynchronously

Answer + AI explanation with Pro

16. What is package.json main?

Junior
  1. A.the entry file a package exposes when it is required by name
  2. B.import/export support enabled via .mjs or "type":"module", loaded asynchronously
  3. C.exports is just a reference to module.exports, so reassigning exports breaks the link
  4. D.Node resolves a bare specifier by walking up parent node_modules directories

Answer + AI explanation with Pro

17. Which term means: "the entry file a package exposes when it is required by name"?

Junior
  1. A.require resolution
  2. B.package.json main
  3. C.module.exports vs exports
  4. D.ES modules in Node

Answer + AI explanation with Pro

18. Which statement is correct?

Junior
  1. A.package.json main — Node resolves a bare specifier by walking up parent node_modules directories
  2. B.package.json main — the entry file a package exposes when it is required by name
  3. C.package.json main — import/export support enabled via .mjs or "type":"module", loaded asynchronously
  4. D.package.json main — exports is just a reference to module.exports, so reassigning exports breaks the link

Answer + AI explanation with Pro

Free to start

Start with a free readiness check

Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every Modules question come with Pro.

Take the free IT readiness check

or take a mock interview set up for this area

24,000+ questions & coding problemsSoftware & IT16,274 questionsGovernment jobs26 examsAptitudenew questions every timeAI practice interviewwith feedback65 topics to practiseMechanical1,149 questionsGATE ME9 papersEngineering Mathematics381 questions2-minute checkfreeDSA Problems1,422Civil1,005 questionsGATE CE9 papersCS Fundamentals1,209 questionsYour scores6 skillsSystem Design25Electrical / EEE1,047 questionsGATE EE9 papersRun your codeC++ · Java · PythonLow-Level Design144Electronics & Comm.975 questionsGATE EC9 papersAI help on every questionFull-Stack6,282Chemical1,005 questionsGATE CH9 papersAI whiteboardsystem designWork abroadEurope · remote · transfersESE ME1 paperGATE practice papers2019–2026ESE CE1 paperDate alertsbefore the last dateESE EE1 paperBehavioural courseHR round practiceESE ET1 paperResume optimizerProSSC JE ME1 paperApplication trackerSSC JE CE1 paperCompany-wise prepSSC JE EE1 paperRole roadmapsRRB JE1 subjectPriced in ₹UPI · cardsISRO SC1 paperGATE CS9 papersIBPS SO IT1 paperUGC NET CS1 paperSSC CGL26 papersIBPS PO26 papersRRB NTPC26 papersSSC CHSL26 papersIBPS Clerk26 papersSBI Clerk26 papersRRB Group D26 papersSSC CPO26 papersSSC GD26 papers