Node Require Flashcards

1
Q

What is the purpose of module.exports in a Node.js module?

A

to allow the main js file to read the file that is exporting the module (js file)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you import functionality into a Node.js module from another Node.js module?

A

’./file’

file directory and file name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly