node.js Flashcards

1
Q

What is Node.js?

A

A server environment

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

web-servers, application-servers, desktop-programs, mobile-apps

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

What is a REPL?

A

Read, evaluate, print, loop

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

What is a computer process?

A

environment where code runs

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

Roughly how many computer processes are running on your host operating system (Task Manager or Activity Monitor)?

A

250+

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

To find out if stuff is running

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

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

A

process

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

What is the data type of process.argv in Node.js?

A

array of strings

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

What is a JavaScript module?

A

A file that can be exported and used in other files

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

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

A

exports, require, module, _filename, _dirname

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

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

A

process, console

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

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

A

Blocked: stops all code until the current function is finished running.
Non-blocking: running things asynchronously

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

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

A

fs

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

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

A

writeFile

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

Are file operations using the fs module synchronous or asynchronous?

A

Asynchronous