Quiz 1 Flashcards
According to Mosh Hamedani the best description of Node is…..
a JavaScript runtime environment
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?
It passes the error to the callback function that was provided
In a Node program, what does “progress.argv” contain?
The command line arguments
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?
process.argv[2]
What is the name of the built in Node module that contains the function readFile?
fs
Which of the following statements about callback functions is false?
It is returned by another function
Mosh Hamedani compares an asynchronous program to a waiter in a restaurant who…?
Serves new tabes while the meals for other tables are being prepared.
What is the name of the object used to make functions in a module accessible to other modules?
Exports
Which of the following is not available in a Node program?
DOM