node-require Flashcards
1
Q
What is the purpose of module.exports in a Node.js module?
A
To pass anything to the require object which can be accessed by their relative path from another module.
2
Q
How do you import functionality into a Node.js module from another Node.js module?
A
Calling the require object and passing one argument of a string containing a period then a relative path to the module.exports property in the other file.