Quiz 1 Flashcards

1
Q

According to Mosh Hamedani the best description of Node is…..

A

a JavaScript runtime environment

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

A synchronous function throws an exception to tell the caller about a critical error that prevented completion of the task. How does an asynchronous function tell the caller about the error?

A

It passes the error to the callback function that was provided

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

In a Node program, what does “progress.argv” contain?

A

The command line arguments

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

Suppose you have a program in the file “app.js” and you are expecting the program to be called with a command line parameter – for example, “node app 4”. How can you get the value that is being passed in?

A

process.argv[2]

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

What is the name of the built in Node module that contains the function readFile?

A

fs

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

Which of the following statements about callback functions is false?

A

It is returned by another function

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

Mosh Hamedani compares an asynchronous program to a waiter in a restaurant who…?

A

Serves new tabes while the meals for other tables are being prepared.

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

What is the name of the object used to make functions in a module accessible to other modules?

A

Exports

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

Which of the following is not available in a Node program?

A

DOM

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