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) What would be the output of the below code ?
                                                                          

var http = require("http"); http.createServer(function (request, response) { response.writeHead(200, {'Content-Type': 'text/plain'}); response.end('Welcome to the nodejs\n'); }).listen(8083); console.log('Server running at http://127.0.0.1:8083/');

A. Welcome to the nodejs
B. Error
C. Server running at http://127.0.0.1:8083/
D. None of the above

Answer:

Welcome to the nodejs

Option:

( A )


Explanation :

No explanations available for this question.


2) What would be the output of the below code ?
                                                                          

$ node > var y = 10

A. 10
B. Error
C. undefined
D. None of the above

Answer:

undefined

Option:

( C )


Explanation :

No explanations available for this question.


3) Find output of the following program ?
                                                                          

$ node > 15 + ( 2 * 4 ) - 8

A. 15
B. Error
C. undefined
D. None of the above

Answer:

15

Option:

( A )


Explanation :

No explanations available for this question.


4) Guess the output of the following program ?
                                                                          

$ node > var k=10 undefined > y=10 10 > k+y

A. Error
B. 20
D. undefined

Answer:

20

Option:

( B )


Explanation :

No explanations available for this question.


5) What would be the output of the below code ?
                                                                          

$ node > y = 10

A. 10
B. Error
D. undefined

Answer:

10

Option:

( A )


Explanation :

No explanations available for this question.