node require Flashcards
1
Q
What is the purpose of module.exports in a Node.js module?
A
Module exports are the instruction that tells Node. js which bits of code (functions, objects, strings, etc.) to “export” from a given file so other files are allowed to access the exported code.
2
Q
How do you import functionality into a Node.js module from another Node.js module?
A
require