Node.js Test 1
When there is no more data to read, the stream sends an end event.
When there is no more data to read, a stream fires an end event.
Which of the following statements concerning the global object __dirname is correct?
The __dirname specifies the name of the directory in which the currently running script is located.
Which of the following lines of code prints the amount of memory used?
To find out how much memory is being consumed, use process.memoryUsage().
Which of the following statements regarding Node.JS is correct?
Which of the following statements concerning the global function setTimeout(cb, ms) is true?
The global function setTimeout(cb, ms) is used to perform callback cb after at least ms milliseconds. The real delay is determined by external factors such as the granularity of the OS timer and the system load. A timer can only run for 24.8 days. The timer is represented by an opaque value returned by this function, which can be used to clear the timer.
Which of the following statements concerning the child process module's spawn method is correct?
The spawn() method returns streams after launching a new process with a supplied command (stdout, stderr).
Which of the following statements regarding the EventEmitter.on property is correct?
The event's on property is used to bind a function to it.
Which of the following statements regarding Chaining Streams is correct?
Chanining is a method of connecting the output of one stream to the output of another stream in order to build a chain of multiple stream operations. It's most commonly associated with piping operations.
Which of the following statements concerning external binding in terms of domain modules is correct?
In the case of external binding, the error emitter is explicitly added to a domain using its add method.