node-require Flashcards
1
Q
What is the purpose of module.exports in a Node.js module?
A
it’s like to tell node.js which part of code to export from a file so that other files are allowed to access it.
2
Q
How do you import functionality into a Node.js module from another Node.js module?
A
you would call the require function to import the function defined within a js file