Node Js MCQ Questions

Node Js MCQ Questions

  • Sharad Jaiswal
  • 20th Nov, 2021

We have introduced here the best Node Js MCQ Questions, which are very popular & cover the latest and important topics of Node Js. This Node Js MCQ Test & Quiz contains Top 30+ Node js MCQ with Answers, so practice these questions to check your final preparation for Node Js exams, interviews & placement drives. When you choose an option for these questions, the green color belongs to the right option & the red color belongs to the wrong option.

Node Js Quiz : Practice Best Node Js MCQ Questions

1) Which module is used to serve static resources in Node.js?

  • A. static
  • B.node-resource
  • C.http
  • D.node-static

2) What is the advantage of using node.js?

  • A. Great concurrency
  • B.Generally fast
  • C.It provides an easy way to build scalable network programs
  • D.All of these

3) What is REPL in Node.js?

  • A. Loop
  • B.Print
  • C.Eval
  • D.All of these

4) How can we check the current version of NPM?

  • A. npm --ver
  • B.npm help
  • C.npm --version
  • D.None of the above

5) Is console a global object?

  • A. false
  • B.true
  • C.null
  • D.none

6) Which of the followings are valid languages for Node.js?

  • A. C#
  • B.C++
  • C.JavaScript
  • D.Java

7) Which of following are a valid form of route path?

  • A. regular expressions
  • B.string patterns
  • C.strings
  • D.All of above

8) Which extension is used to save NodeJs files?

  • A. .java
  • B..txt
  • C..js
  • D..nodejs

9) How Node.js modules are available externally

  • A. module.spread
  • B.module.exports
  • C.module.expose
  • D.None of Above

10) Command to show installed version of Node?

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

11) What is Callback?

  • A. Callback is a technique in which a method call back the caller method.
  • B.Callback is an asynchronous equivalent for a function.
  • C.Both of the above.
  • D.None of the above.

12) How do you kill a process in Node.js?

  • A. Ctrl + B
  • B.Ctrl + K
  • C.Ctrl + T
  • D.Ctrl + C

13) Node uses _________ engine in core.*

  • A. Microsoft Chakra
  • B.Chorme V8
  • C.Node En
  • D.SpiderMonkey

14) How many Node object methods are available?

  • A. 21
  • B.18
  • C.19
  • D.20

15) What is the default scope in Node.js application.

  • A. Global Function
  • B.Local to object
  • C.Local
  • D.Global

16) Node.js terminal (REPL) is used for _________.

  • A. the preview of node.js application.
  • B.testing node.js/JavaScript expressions
  • C.executing browser’s JavaScript expressions.
  • D.None of the above

17) How to test if two nodes are equal?

  • A. ==
  • B.equal()
  • C.isEqualNode()
  • D.none of the mentioned

18) Simple or complex functionality organized in a single or multiple JavaScript files which can be reused throughout your Node.js application is called ________.

  • A. Library
  • B.Package
  • C.Function
  • D.Module

19) Select all valid rout parameter formats

  • A. /books/!:from-:to
  • B./flights/:from-:to
  • C./users/:userId/books/:bookId
  • D.None

20) Which of the following is the correct way to get a normalized path?

  • A. os.normalize('/test/test1//2slashes/1slash/tab/..')
  • B.fs.normalize('/test/test1//2slashes/1slash/tab/..')
  • C.path.normalize('/test/test1//2slashes/1slash/tab/..')
  • D.None of the above

21) Which of the following module is required to create a web server?

  • A. net module
  • B.http module
  • C.net module
  • D.url module

22) Which of the following is true about readable stream?

  • A. Readable stream is used for read operation
  • B.Output of readable stream can be input to a writable stream
  • C.Both of the above
  • D.None of the above

23) How many node types are there in total?

  • A. 13
  • B.14
  • C.12
  • D.11

24) What is the purpose of the Node object property ownerDocument?

  • A. Returns the immediate node
  • B.Returns the parent node
  • C.Returns the root element
  • D.Returns the last element

25) Which method is used to compare the placement of two nodes in the DOM hierarchy (document)?

  • A. cloneNode()
  • B.compareDocumentPosition()
  • C.getFeature()
  • D.getUserData()

26) Which of the following Node object property returns the node immediately before a node?

  • A. localName
  • B.index
  • C.previousSibling
  • D.textContent

27) Which statement is valid in using a Node module fs in a Node based application?

  • A. import fs
  • B.package fs
  • C.var fs = require("fs")
  • D.var fs = import("fs")

28) Node.js is ___________ Language.

  • A. Server Side
  • B.Client Side
  • C.Both
  • D.None of the above.

29) Node.js is written in _____________ .

  • A. c
  • B.c++
  • C.Javascript
  • D.All of the above

30) What does the fs module stand for?

  • A. File Service
  • B.File System
  • C.File Store
  • D.File Attache

31) Which of the following are not Node.js web application frameworks for?

  • A. Geddy
  • B.Aurelia
  • C.Express.js
  • D.Locomotive

32) Which function is used to include modules in Node Js?

  • A. attach();
  • B.require();
  • C.include();
  • D.None of the above

33) Which of the following is not a valid stream in node?

  • A. process. stdin
  • B.process. stderr
  • C.process. stdout
  • D.process. stdinfo

34) Which of the following template engines can be used with Node.js?

  • A. Vash
  • B.Jade
  • C.Handlebars
  • D.All of the Above

35) What can you export with module.exports?

  • A. Only objects.
  • B.Only functions
  • C.Only variables and arrays
  • D.Functions, objects, arrays, or anything you assign to the module

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.

Related MCQ/Quiz

01st
Jun
CodeIgniter MCQ
01st
Jun
Firebase MCQ
01st
Jul
MS Word MCQ