node-require Flashcards
1
Q
What is the purpose of module.exports in a Node.js module?
A
To assign a function or other value to the exports property of the local module object. This allows other modules to import the function or other value using the ‘require’ function
2
Q
How do you import functionality into a Node.js module from another Node.js module?
A
Using the ‘require’ function