Node.js Flashcards

1
Q

What is Node.js?

A

A program that allows JavaScript to be run outside of a web browser.

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

What can Node.js be used for?

A

it is commonly used to build back ends for web applications, command-line programs, or any kind of automation that developers wish to perform.

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

What is a REPL?

A

stands for read-eval-print loop. takes single user inputs, executes them, and returns the result to the user.

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

When was Node.js created?

A

May 27th, 2009

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

What is a computer process?

A

an instance of a computer program that is being executed by one or many threads.

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

Why should a full stack web developer know that computer processes exist?

A

So you don’t blow up someone’s computer.

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

What is the process object in a Node.js program?

A

a global that provides information about, and control over, the current Node.js process.

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

How do you access the process object in a Node.js program?

A

just type process.

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

What is a JavaScript module?

A

a single .js file.

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

What values are passed into a Node.js module’s local scope?

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

Give two examples of truly global variables in a Node.js program.

A

require() and console

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

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

A

it’s a way to export stuff into different files.

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

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

A

allows you to bring a function or other thing from another .js file.

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

What is the JavaScript Event Loop?

A

the event loop is the way that the system manages execution.

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

What is different between “blocking” and “non-blocking” with respect to how code is executed?

A

Blocking refers to operations that block further execution until that operation finishes while non-blocking refers to code that doesn’t block execution.

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

What is a directory?

A

a unique type of file that contains only the information needed to access files or other directories.

17
Q

What is a relative file path?

A

a way to specify the location of a directory relative to another directory.

18
Q

What is an absolute file path?

A

makes no assumptions about your current location in relation to the location of the file or directory that it’s describing.

19
Q

What module does Node.js include for manipulating the file system?

A

the fs module.

20
Q

What method is available in the Node.js fs module for writing data to a file?

A

fs.writeFile

21
Q

Are file operations using the fs module synchronous or asynchronous?

A