Node.js Online Quiz


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 proving itself a perfect technology partner for all of the above mentioned areas.

Q 2 - By default, npm installs any dependency in the global mode.

A - true

B - false

Answer : B

Explanation

By default, npm installs any dependency in the local mode.

Q 3 - Node js is a single threaded application but supports concurrency.

A - true

B - false

Answer : A

Explanation

True! Node js is a single threaded application but it support concurrency via concept of event and callbacks.

Answer : B

Explanation

fs.stat(path, callback) is the method which is used to get information about a file.

Answer : A

Explanation

The clearTimeout( t ) global function is used to stop a timer that was previously created with setTimeout(). Here t is the timer returned by setTimeout() function.

Q 6 - Is process a global object?

A - true

B - false

Answer : A

Explanation

The process object is a global object and can be accessed from anywhere.

Q 7 - Which of the following module is required for path specific operations?

A - os module

B - fs module

C - path module

D - None of the above.

Answer : C

Explanation

Node.js path module is used for handling and transforming file paths.

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 : B

Explanation

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

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