LFZ Node Quiz Flashcards

1
Q

What is Node.js?

A

a PROGRAM THAT RUNS JAVASCRIPT OUTSIDE OF A 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

Pretty much everything

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

What is a REPL?

A

A read–eval–print loop

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

When was Node.js created?

A

2009

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

What back end languages have you heard of?

A

python, c++, ruby, c, php, java, c#, javascript

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

What is a computer process?

A

An instance of a computer program that is being executed

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

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

A

~6

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

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

A

To check resources

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

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

A

The process object is 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
10
Q

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

A

with process

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

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

A

array

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

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

A

console, TextEncoder

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

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

A

To specify what functions to export

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

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

A

Use the require function and assign it to a variable or use it right away

17
Q

What is the JavaScript Event Loop?

A

Checks the stack if its empty, and pushes the next task in queue to the stack

18
Q

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

A

blocking prevents the stack from moving. Synchronous is blocking as each process runs until completion on the stack. non-blocking goes through the event loop

19
Q

What is a directory?

A

A folder that allows us to group files together

20
Q

What is a relative file path?

A

the route to the path from the folder you are currently in/ the file is currently in

21
Q

What is an absolute file path?

A

The route to the path from the root

22
Q

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

A

fs

23
Q

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

A

fs.writeFile

24
Q

Are file operations using the fs module synchronous or asynchronous?

A

asynchronous