node.js Flashcards

1
Q

CLI

A

command line interface

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

GUI

A

graphical user interface

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

man

A

manual command

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

ls pwd

A

list and present working directory

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

echo

A

print a string to the terminal or create it in txt document

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

touch

A

update or create file

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

mkdir

A

make directories

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

mv

A

rename directory or move it

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

rm

A

remove instantly. use with caution

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

cp

A

copy files

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

what is Node.js

A

JavaScript environment where you can execute JS

asynchronous event driven JS runtime

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

REPL

A

read eval print loop

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

process object in node

A

a global object 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
15
Q

how do you access the process object?

A

console.log(process)

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

what is the data type of process.argv?

A

Array of strings

17
Q

What is a JS module?

A

a single JS file

18
Q

What values are passed into a Node.js modules local scope? and are they global?

A

module, exports, require, __filename and __dirname and NO!

19
Q

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

A

to make the functionality of a certain module available to other modules.

20
Q

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

A

require(); passing the relative path to the other module

21
Q

What is a directory?

A

A file containing other files.

22
Q

What is a relative path?

A

the location of a file relative to somewhere.

23
Q

What is an absolute file path?

A

The exact location of a file according to the root directory.

24
Q

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

A

fs module

25
Q

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

A

writeFile();

26
Q

Are file operations using the fs module synchronous or asynchronous?

A

both.