Node - Js Mock Test
Node - Js Mock Test
JS MOCK TEST
http://www.tutorialspoint.com Copyright © tutorialspoint.com
This section presents you various set of Mock Tests related to Node.js Framework. You can
download these sample mock tests at your local machine and solve offline at your convenience.
Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.
B - Node.JS is used to delevop I/O intensive web applications like video streaming sites, single
page applications and other web application.
Q 2 - What is Node.JS?
A - Asynchronous
B - Synchronous
Q 4 - Why code written in Node.JS is pretty fast although being written in JavaScript?
A - Node.JS internally converts JavaScript code to Java based code and then execute the same.
B - Node.JS internally converts JavaScript code to C based code and then execute the same.
Q 5 - How Node based web servers are different from traditional web servers?
A - Node based server process request much faster than traditional server.
B - Node based server uses a single threaded model and can services much larger number of
requests than traditional server like Apache HTTP Server.
Q 8 Which of the following statement is valid to use a Node module http in a Node
based application?
C - package http;
D - import http;
B - $ node start
C - $ node repl
D - $ node console
A - $ npm --version
B - $ node --version
C - $ npm getVersion
D - $ node getVersion
Explaination
Executing $ node --version command will show the version of Node instance.
A - $ npm --version
B - $ node --version
C - $ npm getVersion
D - $ node getVersion
A - true
B - false
Q 16 - By default, npm installs any dependency in the global mode.
A - true
B - false
Q 17 - Which of the following command will show all the modules installed globally?
A - $ npm ls -g
B - $ npm ls
C - $ node ls -g
D - $ node ls
Q 18 - Which of the following command will show all the modules installed locally.
A - $ npm ls -g
B - $ npm ls
C - $ node ls -g
D - $ node ls
Q 20 - What is Callback?
A - true
B - false
C - Node thread keeps an event loop and whenever any task get completed, it fires the
corresponding event which signals the event listener function to get executed.
A - events
B - callback
C - throw
D - handler
ANSWER SHEET
1 D
2 B
3 A
4 C
5 B
6 D
7 C
8 A
9 B
10 A
11 B
12 A
13 B
14 A
15 A
16 B
17 A
18 B
19 D
20 A
21 A
22 B
23 A
24 B
25 C
Loading [MathJax]/jax/output/HTML-CSS/jax.js