Node Js MCQ Questions And Answers

NodeJs MCQ : This section focuses on "Basics" of Node Js. These Multiple Choice Questions (MCQ) should be practiced to improve the NodeJs skills required for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive examinations.

1. Which of the following is true about Node.js?

A. Node.js is an open source server environment.
B. Node.js allows you to run JavaScript on the server.
C. Node.js runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.)
D. All of the above

View Answer


2. Node.js uses _____________ programming.

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

View Answer


3. Which of the following is false?

A. Node.js can create, open, read, write, delete, and close files on the server
B. Node.js can generate static page content
C. Node.js can collect form data
D. Node.js can add, delete, modify data in your database

View Answer


4. Node.js files have extension?

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

View Answer


5. Node.js files must be initiated in the?

A. Command Prompt
B. nodejs Editor
C. Both A and B
D. None of the above

View Answer


6. Node.js runs?

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

View Answer


7. Syntax to Initiate the Node.js File is?

A. filename.js
B. javascript filename.js
C. node filename.js
D. node filename

View Answer


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

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

View Answer


9. Which keyword is used to make properties and methods available outside the module file?

A. import
B. module
C. exports
D. require

View Answer


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

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

View Answer


11. Which method appends specified content to a file.

A. fs.appendFile()
B. fs.open()
C. fs.writeFile()
D. None of the above

View Answer


12. Which method to create an HTTP server?

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

View Answer


13. Which of the following command will show version of Node?

A. $ npm --version
B. $ npm getVersion
C. $ node getVersion
D. $ node --version

View Answer


14. The Node.js modules can be exposed using

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

View Answer


15. What are the key features of Node.js?

A. Real time Data intensive
B. Highly scalable servers for Web Applications
C. Builds fast and scalable network Applications
D. All of the above

View Answer


16. 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


17. which of the following areas, Node.js is not advised to be used?

A. Single Page Applications
B. JSON APIs based Applications
C. CPU intensive applications
D. Data Intensive Realtime Applications (DIRT)

View Answer


18. 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


19. The URL module splits up a web address into readable parts.

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.