Node js Quiz For Freshers & Experienced

  • Question 1) Which module is used to serve static resources in Node.js?
  • Question 2) What is the advantage of using node.js?
  • Question 3) What is REPL in Node.js?
  • Question 4) How can we check the current version of NPM?
  • Question 5) Is console a global object?
  • Question 6) Which of the followings are valid languages for Node.js?
  • Question 7) Which of following are a valid form of route path?
  • Question 8) Which extension is used to save NodeJs files?
  • Question 9) How Node.js modules are availble externally
  • Question 10) Command to show installed version of Node?
  • Question 11) What is Callback?
  • Question 12) How do you kill a process in Node.js?
  • Question 13) Node uses _________ engine in core.*
  • Sharad Jaiswal
  • 03rd Jan, 2019
  • 822 Followers

Node js Quiz
Updated ON

03rd Jan, 2019

No. of Questions

30

Posted In

MCQ

Author

Sharad Jaiswal

Node JS Quiz : Practice Multiple Choice Questions on Node JS

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

  • static
  • node-resource
  • http
  • node-static
View Answer
node-static

Q2. What is the advantage of using node.js?

  • Great concurrency
  • Generally fast
  • It provides an easy way to build scalable network programs
  • All of these
View Answer
All of these

Q3. What is REPL in Node.js?

  • Loop
  • Print
  • Eval
  • All of these
View Answer
All of these

Q4. How can we check the current version of NPM?

  • npm --ver
  • npm --version
  • npm help
  • None of the above
View Answer
npm --version

Q5. Is console a global object?

  • false
  • true
  • null
  • none

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

  • C#
  • C++
  • JavaScript
  • Java
View Answer
JavaScript

Q7. Which of following are a valid form of route path?

  • regular expressions
  • string patterns
  • strings
  • All of above
View Answer
All of above

Q8. Which extension is used to save NodeJs files?

  • .java
  • .txt
  • .node
  • .js

Q9. How Node.js modules are availble externally

  • module.spread
  • module.exports
  • module.expose
  • None of Above
View Answer
module.exports

Q10. Command to show installed version of Node?

  • $ npm --version
  • $ npm getVersion
  • $ node --version
  • $ node getVersion
View Answer
$ node --version

Q11. What is Callback?

  • Callback is a technique in which a method call back the caller method.
  • Callback is an asynchronous equivalent for a function.
  • Both of the above.
  • None of the above.
View Answer
Both of the above.

Q12. How do you kill a process in Node.js?

  • Ctrl + B
  • Ctrl + K
  • Ctrl + T
  • Ctrl + C
View Answer
Ctrl + C

Q13. Node uses _________ engine in core.*

  • Microsoft Chakra
  • Chorme V8
  • Node En
  • SpiderMonkey
View Answer
Chorme V8

Q14. How many Node object methods are available?

  • 21
  • 18
  • 19
  • 20

Q15. What is the default scope in Node.js application.

  • Global Function
  • Local to object
  • Local
  • Global

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

  • the preview of node.js application.
  • testing node.js/JavaScript expressions
  • executing browser’s JavaScript expressions.
  • None of the above
View Answer
testing node.js/JavaScript expressions

Q17. How to test if two nodes are equal?

  • ==
  • equal()
  • isEqualNode()
  • none of the mentioned
View Answer
isEqualNode()

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

  • Library
  • Package
  • Function
  • Module
View Answer
Module

Q19. Select all valid rout parameter formats

  • /books/!:from-:to
  • /flights/:from-:to
  • /users/:userId/books/:bookId
  • None
View Answer
/books/!:from-:to

Q20. Which of the following is the correct way to get a normalized path?

  • os.normalize('/test/test1//2slashes/1slash/tab/..')
  • fs.normalize('/test/test1//2slashes/1slash/tab/..')
  • path.normalize('/test/test1//2slashes/1slash/tab/..')
  • None of the above
View Answer
path.normalize('/test/test1//2slashes/1slash/tab/..')

Q21. Which of the following module is required to create a web server?

  • net module
  • http module
  • net module
  • url module
View Answer
url module

Q22. Which of the following is true about readable stream?

  • Readable stream is used for read operation
  • Output of readable stream can be input to a writable stream
  • Both of the above
  • None of the above
View Answer
Both of the above

Q23. How many node types are there in total?

  • 13
  • 14
  • 12
  • 11

Q24. What is the purpose of the Node object property ownerDocument?

  • Returns the immediate node
  • Returns the parent node
  • Returns the root element
  • Returns the last element
View Answer
Returns the root element

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

  • cloneNode()
  • compareDocumentPosition()
  • getFeature()
  • getUserData()
View Answer
compareDocumentPosition()

Q26. Which of the following Node object property returns the node immediately before a node?

  • localName
  • index
  • previousSibling
  • textContent
View Answer
previousSibling

Q27. Which statement is valid in using a Node module fs in a Node based application?

  • import fs
  • package fs
  • var fs = require("fs")
  • var fs = import("fs")
View Answer
var fs = import("fs")

Q28. Node.js is ___________ Language.

  • Server Side
  • Client Side
  • Both
  • None of the above.
View Answer
Server Side

Q29. 2. Node.js is written in _____________ .

  • c
  • c++
  • Javascript
  • All of the above
View Answer
All of the above

Q30. What does the fs module stand for?

  • File Service
  • File System
  • File Store
  • File Attache
View Answer
File System

About Author :

  • Author of Node js Quiz

    Sharad Jaiswal

    Sharad Jaiswal is Sr. Web Developer from Noida area. He have rich experience in PHP, Angular Js, React, javascript and Node .If you any query or project on these programming you can drop your enquiry in comment section.

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.