Node.js Flashcards Preview

Web Development > Node.js > Flashcards

Flashcards in Node.js Deck (52)
Loading flashcards...
1

What is a code block? What are some examples of a code block?

section of code enclosed within { }, ex: function, conditional, loop

2

What is a CLI?

command-line interface, text-based

3

What is a GUI?

graphical-user interface, graphical icon-based

4

man

user manual for commands

5

cat

combine content of files

6

ls

shows content of directory

7

pwd

shows current directory

8

echo

prints out text on terminal, like console.log( )

9

touch

changes file timestamps, can be used to create a new file

10

mkdir

creates a new directory

11

mv

renames or moves a file

12

rm

deletes a file

13

cp

copies a file

14

What are the three virtues of a great programmer?

laziness, impatience, hubris

15

What is Node.js?

a program that allows JS to be run outside of a web browser

16

What can Node.js be used for?

it can be used for back-ends for Web applications, command-line programs anything with automation

17

What is a REPL?

read-eval-print loop

18

When was Node.js created?

May 27, 2009

19

What is a computer process?

a process is the instance of a computer program that is being executed by one or many threads

20

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

480 processes

21

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

Full stack Web development is based on making multiple processes work together to form one application, so having at least a cursory awareness of computer processes is necessary

22

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

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

23

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

with or without require( )

24

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

an array of strings of the command-line arguments

25

What is a JavaScript module?

a single .js file

26

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

module, exports, require( ), __dirname, __filename

27

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

process, global

28

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

allows you to export functions and objects from a module to be used in another

29

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

require( relative path to file)

30

What is the JavaScript Event Loop?

the event loop looks at the call stack and the task queue; if the stack is empty, the event loop pushes the first thing on the queue into the stack