06th
Sep
Node js MCQ

Node js MCQ

  • Admin
  • 06th Sep, 2021
  • 544 Followers

Node JS MCQ Quiz & Practice Test

Following are mostly asked Node js MCQ test that are designed for professionals like you to crack you interviews. You can take this Node js online test before appearing to you real interview. This Node js quiz there are around 30+ multiple choice questions on Node js with four options.

1) how node.js modules are available externally

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

2) what is callback in node js mcq?

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

3) Node uses _________ engine in core.

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

4) Node uses _________ engine in core.

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

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

  • A. http
  • B. static
  • C. node-static
  • D. node-resource
Download Free : Node js MCQ PDF

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

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

7) What is Node.js?

  • A. a platform built on Chrome's JavaScript runtime for easily building fast and scalable network applications
  • B. a language built on Chrome's JavaScript runtime for easily building fast and scalable network applications
  • C. JavaScript runtime for easily building fast and scalable network applications
  • D. None of the above

8) Which of the following statement is valid to use a Node module http in a Node based application?

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

9) Which of the following API creates a client?

  • A. net.createServer([options][, connectionListener])
  • B. net.connect(options[, connectionListener])
  • C. net.createConnection(port[, host][, connectListener])
  • D. None of the above

10) Node.js was developed by ___.

  • A. Ryan Dahl
  • B. Dennis Ritchie
  • C. James Gosling
  • D. None of the above

11) Node.js applications are written in ___, and can be run within the Node.js runtime on OS X, Microsoft Windows, and Linux.

  • A. JAVA
  • B. JavaScript
  • C. C
  • D. None of the above

12) What are the features of Node.js?

  • A. Very Fast
  • B. Single Threaded but Highly Scalable
  • C. Asynchronous and Event Driven
  • D. All of the above

13) REPL stands for ___.

  • A. Read Eval Print Loop
  • B. Read Event Print Loop
  • C. Read Eval Printed Loop
  • D. None of the above

14) Which of the following is not REPL Commands in Node.js?

  • A. .help
  • B. .break
  • C. .clear
  • D. None of the above

15) EventEmitter provides on property which is used to bind a function with the event.

  • A. True
  • B. False

16) EventEmitter provides emit property which is used to fire an event.

  • A. True
  • B. False

17) The Node.js modules can be exposed using ___.

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

18) Which statement executes the code of sample.js file?

  • A. nodejs sample.js
  • B. node sample.js
  • C. sample.js
  • D. None of the above

19) The ___ global function is used to stop a timer that was previously created with ___.

  • A. clearTimeout(t), setTimeout()
  • B. setTimeout(), clearTimeout(t)
  • C. Both A and B
  • D. None of the above

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

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

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

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

22) What should you do in your code to improve your application’s performance?

  • A. Use gzip compression
  • B. Don’t use synchronous functions
  • C. Do logging correctly
  • D. Handle exceptions properly

23) Which of the following tool automates various tasks of Node.js application?

  • A. Express.js
  • B. GruntJS
  • C. NPM
  • D. None of the above

24) When did Ryan Dahl authored Node.js?

  • A. 2007
  • B. 2006
  • C. 2009
  • D. 2010

25) Who createad NPM (Node Package Manager)?

  • A. Brendan Eich
  • B. Isaac Z. Schlueter
  • C. Ryan Dahl
  • D. Google

26) JSON was a native construct of which language?

  • A. PHP
  • B. Java
  • C. Ruby On Rails
  • D. Javascript

27) Which foundation was created with the joint effort of node and JS?

  • A. Joint
  • B. JsNode
  • C. JNode
  • D. ASpark

28) What was the version released By Joint

  • A. v 0.1.0
  • B. v 0.6.0
  • C. v 0.6.1
  • D. v 0.1.2

29) Which function is used to include the modules in Node.js

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

Node Js Online Test Questions (Node Js FAQs)

1) What is repl in Node js?

REPL(Read-Eval-Print-Loop) is an interactive shell that processes Node.js expressions. The shell reads JavaScript code given by the user and evaluates the result of interpreting the line of code. It prints the result to the user and loops until the user signals to quit.

2) What is callback in Node js?

The callback is an asynchronous equivalent for a function, it is called at the completion of a given task.

3) What is promise in node js?

A Promise is a value returned by an asynchronous function to indicate the completion of the processing carried out by the asynchronous function.

4) What is first argument typically passed to a node.js callback handler?

The first argument typically passed to the callback is the error value. If the function hits an error, then call the callback with the first parameter being an Error object.

5) What is libuv?

"libuv" is a multi-platform support open-source library with a focus on asynchronous Input or Output.

6) What is the Reactor Pattern in Node.js?

Reactor Pattern is used to avoid the blocking of the Input or Output operations. It provides us with a handler that is associated with I/O operations.

7) What is stub in Node.js?

Stubs are functions or programs that affect the behavior of components or modules. They are dummy objects for testing and implement a pre-programmed response.

8) What are modules in Node Js?

Module in Node. js is a simple or complex functionality organized in single or multiple JavaScript files which can be reused throughout the Node. js application.

9) What is Express.js?

Express is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications. It provides us a simple API to build websites, web apps and back ends.

10) What is NPM?

npm is the package manager for the Node JavaScript platform. It is the world's largest Software Registry. Generally, it is used to publish, discover, install, and develop node programs.

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.

Related MCQ/Quiz

01st
Sep
Python MCQ
01st
May
Spring MCQ
01st
Sep
Html5 MCQ