Nodejs Basis Concept Multiple choice question

Exercise : - Multiple Choice Question On Nodejs, MCQ Nodejs Basis concept

This section contains a lot of nodejs question and answer with explanation on the topic basis concept. These question and answer are very much helpful for interview(campus interviews, walkin interviews, company interviews), competitive examination ,entrance test and placements. Each question having answer and explanation that would help you to understand easily. These question are designed from basic to advance level. So anyone can learn from here (beginner, fresher, engineering graduate, an experienced IT professional).

All the question of nodejs are listed below on basis concept along with detailed explanation / solution and answer.

1) Which statement execute the code of sample.js file?
A. nodejs sample.js
B. node sample.js
C. sample.js
D. None of the above

Answer:

node sample.js

Option:

( B )


Explanation :

No explanations available for this question.


2) How can we create instance of http module ?
A. var http = require("http");
B. var http = new require("http");
C. var http = new http();
D. None of the above

Answer:

var http = require("http");

Option:

( A )


Explanation :

No explanations available for this question.


3) The $ npm ls -g statement is used to list down all the locally installed module?
A. True
B. False

Answer:

False

Option:

( B )


Explanation :

No explanations available for this question.


4) How can we check the cujrrent version of NPM?
A. npm --version
B. npm --ver
C. npm help
D. None of the above

Answer:

npm --version

Option:

( A )


Explanation :

No explanations available for this question.


5) To install Node.js express module
A. $ npm install express
B. $ node install express
C. $ install express
D. None of above

Answer:

$ npm install express

Option:

( A )


Explanation :

No explanations available for this question.