Node.js Flashcards

1
Q

What is Node.js?

A

an asynchronous event-driven JavaScript runtime,Node.js is an open-source, cross-platform, back-end JavaScript runtime environment that runs on the V8 engine and executes JavaScript code outside 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

build scalable network applications

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

What is a REPL?

A

(Read–eval–print loop) interactive computer programming environment that takes single user inputs, executes them, and returns the result to the user; a program written in a REPL environment is executed piecewise.

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

When was Node.js created?

A

-May 27, 2009 11yrs ago

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, php, java, ruby

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

What is a computer process?

A

a process is the 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
7
Q

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

A

120+

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

you need to know if your applications are running.

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. As a global, it is always available to Node.js applications without using require().

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

process (javascript Window)

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 of strings

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

What is a JavaScript module?

A

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 , global

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

exporting code so that other files/modules are able to use it

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

require() function // Used to import modules, JSON, and local files.

17
Q

What is a directory?

A

file system that let users group files

18
Q

What is a relative file path?

A

location of a file that is relative to the directory

19
Q

What is an absolute file path?

A

the starting point of a file system / signifies starting.

20
Q

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

21
Q

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

A

fs.writeFile()

22
Q

Are file operations using the fs module synchronous or asynchronous?

A

asynchronous