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

Explanation

Node.js is a JavaScript based framework/platform built on Google Chrome's JavaScript V8 Engine.

Q 2 - Which of the following command will show version of npm?

A - $ npm --version

B - $ node --version

C - $ npm getVersion

D - $ node getVersion

Answer : A

Explanation

Executing $ npm --version command will show the version of npm instance.

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

Explanation

fs.read(fd, buffer, offset, length, position, callback) is the method which is used to read a file.

Answer : C

Explanation

fs.readdir(path, callback)is the method which is used to read a directory.

Q 6 - Is console a global object?

A - true

B - false

Answer : A

Explanation

Node.js console is a global object and is used to print different levels of messages to stdout and stderr.

Answer : A

Explanation

os.totalmem() returns the total amount of system memory in bytes.

Q 8 - Which of the following module is required for DNS specific operations?

A - dns module

B - web module

C - net module

D - None of the above.

Answer : A

Explanation

Node.js dns module is used to do actual DNS lookup as well as to use underlying operating system name resolution functionalities.

Q 9 - Which of the following module is required to create a child process?

A - process module

B - child_process module

C - child module

D - web module

Answer : B

Explanation

Node provides child_process module which provides ways to create child process.

Q 10 - Each type of Stream is an EventEmitter.

A - true

B - false

Answer : A

Explanation

Each type of Stream is an EventEmitter instance and throws several events at different instance of times.

nodejs_questions_answers.htm
Advertisements