Node JS/Nodejs Mcq Question Set 1 Sample Test,Sample questions

Question:
 How many Node object methods are available?

1.21

2.18

3.19

4.20

Posted Date:-2022-01-21 10:23:45


Question:
 The net.isIP(input) returns 0 for invalid input. Is it true?

1.True

2.False

3.all of the above

4.none of the above

Posted Date:-2022-01-21 11:28:18


Question:
 What is the best practice to do in your code to improve the performance of your application?

1.Using gzip compression.

2.Don't use synchronous functions.

3.Do logging correctly.

4.Handle exceptions properly.

Posted Date:-2022-01-21 10:13:14


Question:
 What is the main usage of Node.js terminal (REPL)?

1.To specify the preview of the Node.js application.

2.For testing Node.js/JavaScript expressions.

3.For executing browser's JavaScript expressions.

4.None of the above.

Posted Date:-2022-01-21 10:24:43


Question:
 Which of the following engine Node in core?

1.Chrome V8

2.Microsoft Chakra

3.SpiderMonkey

4.Node En

Posted Date:-2022-01-21 10:14:02


Question:
 Which of the following method is used to return the current working directory of the process?

1.cwd();

2.cwd();

3.pwd();

4.None of the above.

Posted Date:-2022-01-21 10:11:02


Question:
 Which of the following method of fs module is used to truncate a file?

1.fs.delete(fd, len, callback)

2.fs.remove(fd, len, callback)

3.fs.ftruncate(fd, len, callback)

4.None of the above.

Posted Date:-2022-01-21 10:09:20


Question:
 Which of the following shortcut command is used to kill a process in Node.js?

1.Ctrl + B

2.Ctrl + K

3.Ctrl + T

4.Ctrl + C

Posted Date:-2022-01-21 10:15:17


Question:
A stream fires data event when there is data available to read. Is it true?

1.True

2.False

3.all of the above

4.none of the above

Posted Date:-2022-01-21 11:28:55


Question:
A stream fires finish event when all data has been flushed to the underlying system. Is it true?

1.True

2.False

3.all of the above

4.none of the above

Posted Date:-2022-01-21 11:28:38


Question:
In Nodejs how node based web servers differ from traditional web servers?

1.Node based server uses a single threaded model and can serve much larger number of requests compared to any traditional server like Apache HTTP Server.

2.Node based server process request much faster than traditional server.

3.There is no much difference between the two.

4.All of the above

Posted Date:-2022-01-22 05:21:35


Question:
In which language is Node.js written?

1.JavaScript

2.C++

3.CoffeeScript

4.All of the above

Posted Date:-2022-01-21 10:03:45


Question:
Is Node.js multithreaded?

1.Yes

2.no

3.all of the above

4.none of the above

Posted Date:-2022-01-21 11:27:25


Question:
Is the process a global object and can be accessed from anywhere?

1.True

2.False

3.SOAP

4.None of these

Posted Date:-2022-01-21 11:27:43


Question:
Node.js uses an event-driven, non-blocking I/O model. Is it true?

1.True

2.False

3.all of the above

4.none of the above

Posted Date:-2022-01-21 11:28:02


Question:
The buffer class is a global class that can be accessed without importing a buffer module.

1.True

2.False

3.all of the above

4.none of the above

Posted Date:-2022-01-21 11:27:05


Question:
The Node.js modules can be exposed using

1.module.expose

2.module

3.module.exports

4.All of the above

Posted Date:-2022-01-22 05:20:53


Question:
The Node.js modules can be exposed using:

1.expose

2.module

3.exports

4.All of the above

Posted Date:-2022-01-21 10:06:34


Question:
What does the fs module stand for?

1.File Service

2.File System

3.File Store

4.File Sharing

Posted Date:-2022-01-21 10:08:28


Question:
What does the REPL stand for?

1.REPL stands for "Read Eval Print Loop."

2.REPL stands for "Research Eval Program Learn."

3.REPL stands for "Read Earn Point Learn."

4.EPL stands for "Read Eval Point Loop."

Posted Date:-2022-01-21 10:02:35


Question:
What is Callback?

1.The callback is a technique in which a method calls back the caller method.

2.The callback is an asynchronous equivalent for a function.

3.Both of the above.

4.None of the above.

Posted Date:-2022-01-21 10:04:40


Question:
What is the default scope in the Node.js application?

1.Global

2.Local

3.Global Function

4.Local to object

Posted Date:-2022-01-21 10:13:37


Question:
What is the use of underscore variable in REPL session in Node.js?

1.It is used to store the result.

2.It is used to get the last command used.

3.It is used to get the last result.

4.None of the above.

Posted Date:-2022-01-21 11:26:47


Question:
Which of the following areas, Node.js, is not advised to be used?

1.Single Page Applications

2.JSON APIs based Applications

3.CPU intensive applications

4.Data-Intensive Real-time Applications (DIRT)

Posted Date:-2022-01-21 10:26:52


Question:
Which of the following code print the platform of operating system?

1.console.log('platform : ' + os.platform);

2.console.log('platform : ' + os.platform());

3.console.log('platform : ' + os.getPlatform());

4.None of the above.

Posted Date:-2022-01-21 10:10:26


Question:
Which of the following command is used to install the Node.js express module?

1.$ npm install express

2.$ node install express

3.$ install express

4.none of the above

Posted Date:-2022-01-21 10:04:13


Question:
Which of the following command is used to start a REPL session?

1.$ node

2.$ node start

3.$ node repl

4.$ node console

Posted Date:-2022-01-21 10:03:07


Question:
Which of the following extension is used to save the Node.js files?

1..js

2..node

3..java

4..txt

Posted Date:-2022-01-21 10:05:15


Question:
Which of the following is a GUI-based debugging tool for Node.js?

1.Core node debugger

2.Console

3.REPL

4.Node Inspector

Posted Date:-2022-01-21 11:26:22


Question:
Which of the following is not a benefit of using modules in Express?

1.It provides a means of dividing up tasks.

2.It provides a means of reuse of program code.

3.It provides a means of reducing the size of the program.

4.It provides a means of testing individual parts of the program.

Posted Date:-2022-01-21 10:12:07


Question:
Which of the following is not a valid language for Node.js?

1.JavaScript

2.Java

3.C

4.C++

Posted Date:-2022-01-21 10:14:55


Question:
Which of the following is the correct syntax to initiate the Node.js File?

1.filename.js

2.javascript filename.js

3.node filename.js

4.node filename

Posted Date:-2022-01-21 10:28:05


Question:
Which of the following is true about RESTful web services?

1. Webservices based on REST Architecture are known as RESTful web services

2.Webservices uses HTTP methods to implement the concept of REST architecture

3. Both of the above

4.none of the above

Posted Date:-2022-01-21 11:30:29


Question:
Which of the following is used to test if two nodes are equal?

1.==

2.equal()

3.isEqualNode()

4.None of the above.

Posted Date:-2022-01-21 10:25:31


Question:
Which of the following keyword is used to make properties and methods available outside the module file?

1.import

2.module

3.exports

4.require

Posted Date:-2022-01-21 10:29:16


Question:
Which of the following method can append specified content to a file?

1.fs.appendFile()

2.fs.open()

3.fs.writeFile()

4.None of the above.

Posted Date:-2022-01-21 11:26:00


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

1.cloneNode()

2.compareDocumentPosition()

3.getFeature()

4.getUserData()

Posted Date:-2022-01-21 10:28:28


Question:
Which of the following method of fs module is used to get file information?

1.fs.open(path, flags[, mode], callback)

2.fs.stat(path, callback)

3.fs.readFile(path, flags[, mode], callback)

4.None of the above.

Posted Date:-2022-01-21 10:07:31


Question:
Which of the following module is not a built-in node module?

1.zlib

2.https

3.dgram

4.fsread

Posted Date:-2022-01-21 10:07:01


Question:
Which of the following module is required to create a web server?

1.net module

2.http module

3.net module

4.url module

Posted Date:-2022-01-21 10:27:40


Question:
Which of the following Node.js object property is used to return the node immediately before a node?

1.localName

2.index

3.previousSibling

4.textContent

Posted Date:-2022-01-21 10:29:41


Question:
Which of the following platforms does Node.js support?

1.Windows

2.Macintosh

3.Unix/Linux

4.All of the above.

Posted Date:-2022-01-21 10:28:51


Question:
Which of the following route parameter formats are valid?

1./books/!:from-:to

2./flights/:from-:to

3./users/:userId/books/:bookId

4.None of the above.

Posted Date:-2022-01-21 10:27:19


Question:
Which of the following statement defines Express?

1.Express is an application framework that provides a robust set of features to develop desktop-based applications.

2.Express is a minimal and flexible Node.js web application framework that provides a robust set of features to develop web and mobile applications.

3.Both of the above.

4.None of the above.

Posted Date:-2022-01-21 10:11:36


Question:
Which of the following statement is correct?

1.js is Server Side Language.

2.js is the Client Side Language.

3.js is both Server Side and Client Side Language.

4.None of the above.

Posted Date:-2022-01-21 10:02:07


Question:
Which of the following statement is used to execute the code of the sample.js file?

1.sample.js

2.node sample.js

3.nodejs sample.js

4.None of the above.

Posted Date:-2022-01-21 10:14:29


Question:
Which of the following template engines can be used with Node.js?

1.Jade

2.Vash

3.Handlebars

4.All of the above

Posted Date:-2022-01-21 10:10:03


Question:
Which of the following tool is used to automate the various tasks of the Node.js application?

1.Express.js

2.GruntJS

3.NPM

4.none of the above

Posted Date:-2022-01-21 10:26:24


Question:
Which of the following types of applications can be built using Node.js?

1.Web Application

2.Chat Application

3.RESTful Service

4.All of the above

Posted Date:-2022-01-21 10:25:08


Question:
Which statement executes the code of sample.js file?

1. nodejs sample.js

2.node sample.js

3. sample.js

4. None of the above

Posted Date:-2022-01-22 05:22:02


More MCQS

  1. Nodejs Mcq Question Set 1
  2. Nodejs Mcq Question Set 2
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!