Following quiz provides Multiple Choice Questions (MCQs) related to Node.js Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.
Q 1 - In which of the following areas, Node.js is perfect to use?
Node.js is proving itself a perfect technology partner for all of the above mentioned areas.
Q 2 - Which of the following is true about package.json?
package.json is present in the root directory of any Node application/module and is used to define the properties of a package. It can also be used to update dependencies of a Node application.
Q 3 - Which of the following is true about EventEmitter.on property?
on property is used to bind a function with the event.
Q 4 - Which method of fs module is used to write a file?
fs.writeFile(path, flags[, mode], callback) is the method which is used to write a file.
Q 5 - Which of the following is true about setInterval(cb, ms) global function?
The setInterval(cb, ms) global function is used to run callback cb repeatedly after at least ms milliseconds. The actual delay depends on external factors like OS timer granularity and system load. - A timer cannot span more than 24.8 days. This function returns an opaque value that represents the timer which can be used to clear the timer using the function clearInterval(t).
Q 6 - Which of the following code print the endianness of operating system?
os.endianness() returns the endianness of the CPU. Possible values are "BE" or "LE".
Q 7 - Which of the following code print the platform of operating system?
os.platform() returns the operating system platform.
Q 8 - Which of the following module is required for DNS specific operations?
Node.js dns module is used to do actual DNS lookup as well as to use underlying operating system name resolution functionalities.
Q 9 - Which of the following is true about external binding with respect to domain module?
Error emmitter is added explicitly to a domain using its add method in case of external binding.
Transform stream is a duplex stream where the output is computed based on input.