In CommonJS, what does module.exports do?
- A Imports another module
- B Defines what the module makes available to code that requires it
- C Declares dependencies
- D Exports environment variables
Answer
Defines what the module makes available to code that requires it
module.exports is the object returned by require(). Reassigning exports alone does not work, because it only rebinds the local variable.





