Node.js Online Quiz


Advertisements


Following quiz provides Multiple Choice Questions (MCQs) related to Node.js Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Questions and Answers

Answer : D

Explanation

Node.js is a very powerful JavaScript based framework/platform built on Google Chrome's JavaScript V8 Engine. It is used to delevop I/O intensive web applications like video streaming sites, single page applications and other web application. Node.js is open source, completely free, and used by thousands of developers around the world.

Answer : A

Explanation

npm stands for Node Package Manager.

Q 3 - Which of the following provides in-built events.

A - events

B - callback

C - throw

D - handler

Answer : A

Explanation

Node has multiple in-built events available through events module.

Answer : C

Explanation

Chanining is a mechanism to connect output of one stream to another stream and create a chain of multiple stream operations. It is normally used with piping operations.

Answer : C

Explanation

Node.js global objects are global in nature and they are available in all modules. We do not need to include these objects in our application, rather we can use them directly.

Answer : B

Explanation

os.endianness() returns the endianness of the CPU. Possible values are "BE" or "LE".

Answer : A

Explanation

net.createServer([options][, connectionListener]) creates a new TCP server. The connectionListener argument is automatically set as a listener for the 'connection' event.

Q 8 - Which of the following method resolves an ip address to an array of hostnames?

A - dns.reverse(ip, callback)

B - dns.resolve(hostname[, rrtype], callback)

C - dns.resolve4(hostname, callback)

D - None of the above.

Answer : A

Explanation

dns.reverse(ip, callback) resolves an ip address to an array of hostnames.

Answer : C

Explanation

The fork() method method is a special case of the spawn() to create Node processes. It returns object with a built-in communication channel in addition to having all the methods in a normal ChildProcess instance.

Q 10 - A stream fires data event when there is data available to read.

A - false

B - true

Answer : B

Explanation

A stream fires data event when there is data available to read.


nodejs_questions_answers.htm

Advertisements