Node js Quiz

Node js Quiz | Freshers & Experienced

  • Sharad Jaiswal
  • 28th Oct, 2020

Practice Multiple Choice Questions on Node JS. Here the important question of the node.js MCQ which is As per the interview. You have to select the right answer for the attempt Node JS Quiz.

Node JS Quiz : Practice Multiple Choice Questions on Node JS

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

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.

Related MCQ/Quiz

01st
Apr
Aptitude MCQ
01st
Feb
Science MCQ
01st
Apr
Accounting MCQ