Call back and error handling Flashcards

1
Q

first class function

A

treating functions like variables and passing around

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

closure

A

a function defined inside another function has access to all the variables declared in the outer function (outer scope)

the inner function will continue to have access to the variables from the outer scope even after the outer function has returned

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

single threaded event loop

A

picks a request from queue
service that request
some request may trigger io opperation
branch off and continue the execution of next request

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

node convention to write callback function

A

very first parameter must be always error

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

throw an error

A

throw new Error “string”

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

Yargs

Npm install yargs –save

A

Supports command line arguments to be supplied to node aplication

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

………. variable determines the export from the current module

A

Module.exports

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

The ……… function is used to import a module

A

Require

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