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

Answer : A

Explanation

Callback is an asynchronous equivalent for a function.

Answer : C

Explanation

emit property is used to fire an event.

Answer : C

Explanation

Every method in fs module have synchronous as well as asynchronous form. Asynchronous methods of fs module take last parameter as completion function callback and first parameter of the callback function as error.

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

Explanation

process.cwd() can be used to get the current working directory.

Answer : A

Explanation

os.freemem() returns the free amount of system memory in bytes.

Q 8 - net.isIP(input) returns 6 for IP version 6 addresses.

A - true

B - false

Answer : A

Explanation

net.isIP(input) tests if input is an IP address. Returns 0 for invalid strings, returns 4 for IP version 4 addresses, and returns 6 for IP version 6 addresses.

Q 9 - Which of the following module is required to create a web server?

A - url module

B - net module

C - http module

D - web module

Answer : C

Explanation

Node.js provides http module which can be used to create HTTP client of server.

Q 10 - A stream fires error event when there is any error receiving or writing data.

A - false

B - true

Answer : B

Explanation

A stream fires error event when there is any error receiving or writing data.


nodejs_questions_answers.htm

Advertisements