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

Explanation

Being built on Google Chrome's V8 JavaScript Engine, Node.js library is very fast in code execution.

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

A - true

B - false

Answer : A

Explanation

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

Q 3 - Buffer class is a global class and can be accessed in application without importing buffer module.

A - true

B - false

Answer : A

Explanation

Buffer class is a global class and can be accessed in application without importing buffer module.

Answer : D

Explanation

Piping is a mechanism where we provide output of one stream as the input to another stream. It is normally used to get data from one stream and to pass output of that stream to another stream. There is no limit on piping operations.

Answer : B

Explanation

fs.rmdir(path, callback) is the method which is used to remove 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.

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 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.

Answer : A

Explanation

REST stands for REpresentational State Transfer.

Q 10 - Which of the following is not a valid HTTP method?

A - get

B - put

C - post

D - header

Answer : D

Explanation

header is not a valid HTTP method.


nodejs_questions_answers.htm

Advertisements