Node Module System Flashcards
1
Q
What is a JavaScript module?
A
Separating chunks of code to keep files short and succinct
2
Q
What are the advantages of modular programming?
A
Easier readability, consumes less memory at once.
3
Q
In JavaScript, how do you make a function in a module available to other modules?
A
Export (insert here),
EX: Export default add;
4
Q
In JavaScript, how do you use a function from another module?
A
import (codeblock) from (file)
EX: import add from â.add.jsâ;