NodeJs MCQ Questions

11. Node.js uses _____________ programming.

A. asynchronous
B. synchronous
C. Both A and B
D. None of the above

View Answer


12. Node.js files have extension?

A. .njs
B. .node
C. .js
D. .nj

View Answer


13. Node.js runs?

A. single-threaded
B. non-blocking
C. asynchronously programming
D. All of the above

View Answer


14. To include a module, use the ___________ function with the name of the module.

A. function()
B. require()
C. exports()
D. module()

View Answer


15. Node.js has a built-in module called?

A. https
B. http
C. server
D. module

View Answer


16. Which method to create an HTTP server?

A. createServer()
B. getServer()
C. putServer()
D. setServer()

View Answer


17. The Node.js modules can be exposed using

A. module.expose
B.  module
C. module.exports
D. All of the above

View Answer


18. Which of the following is true about process global object?

A. The process object is an instance of EventEmitter.
B. process emits exit event when process is about to exit.
C. process emits uncaughtException when when an exception bubbles all the way back to the event loop.
D. All of the above

View Answer


19. A package in Node.js contains all the files you need for a module.

A. TRUE
B. FALSE
C. Can be true or false
D. Can not say

View Answer


20. The fs.read() method is used to read files on your computer.

A. TRUE
B. FALSE
C. Can be true or false
D. Can not say

View Answer





Discussion


* You must be logged in to add comment.