Node Module System Flashcards

1
Q

What is a JavaScript module?

A

Separating chunks of code to keep files short and succinct

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

What are the advantages of modular programming?

A

Easier readability, consumes less memory at once.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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;

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

In JavaScript, how do you use a function from another module?

A

import (codeblock) from (file)
EX: import add from “.add.js”;

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