About Node js

Following are some of the multiple choice questions on the Node js with answers that will help the students in developing their knowledge.

Node js MCQ

1. Node Js is

  • Synchronous
  • Asynchronous

2. What is the HTML tag under which one can write the JavaScript code?

  • <javascript>
  • <scripted>
  • <script>
  • <js>

3. Npm stands for

  • Node Project Manager
  • Node Package Manager
  • New Project Manager
  • Nodes Packages Manager

4. How can we create instance of http module ?

  • var http = new require("http");
  • var http = new http();
  • var http = require("http");
  • None of the above

5. Command to show installed version of Node

  • npm --version
  • node --version
  • npm get version
  • node get version

6. Is node js multithreaded?

  • Yes
  • No

7. When was MongoDB created?

  • In January 2008
  • In February 2009
  • In March 2010
  • In April 2011

8. How many Node object methods are available?

  • 18
  • 19
  • 20
  • 21

9. Which function is used to include the modules in Node.js

  • include();
  • require();
  • attach();
  • None of the above

10. What is the default scope in NodeJs application.

  • Global
  • Private
  • Public
  • Local

11. Which function is used to include modules in Node Js.

  • include();
  • require();
  • attach();

12. NodeJs is ___________ Language.

  • Server Side
  • Client Side
  • Both
  • None of the above

13. What is REPL in Node.js?

  • Loop
  • Print
  • Eval
  • All of these

14. What is the advantage of using node.js?

  • Great concurrency
  • Generally fast
  • It provides an easy way to build scalable network programs
  • All of these

15. Which module is used to serve static resources in Node.js?

  • static
  • node-resource
  • http
  • node-static

16. To install Node.js express module

  • $ npm install express
  • $ node install express
  • $ install express
  • None of above

17. Which statement execute the code of sample.js file?

  • nodejs sample.js
  • node sample.js
  • sample.js
  • None of the above

18. Package.json is is used to define the properties of a package?

  • True
  • False

19. Node.js application can access which of the following databases?

  • NoSQL databases
  • relational databases
  • All of the above
  • None of the above

20. Which of the following are not Node.js web application frameworks for?

  • Express.js
  • Geddy
  • Aurelia
  • Locomotive

21. Which of the following core module is used to create a web server in Node.js?

  • fs
  • url
  • connect
  • http

22. Module in Node.js is a simple or complex functionality organized in...

  • a single JavaScript file
  • single or multiple JavaScript files
  • the core built in functionality of Node.js
  • Node.js doesn't support modules functionality

23. How can you see all the dependencies for a Node.js app?

  • All the dependencies are listed down in the package.json file
  • By executing "npm i" and capturing the dependencies list
  • You can't have dependencies in a Node.js app
  • All the dependencies are listed down in the package-dependencies.json file

24. In Node.js, HTTP Basic Authentication is quite recommended due to its inherent security strongness

  • True
  • False
  • True, and also because it is a straightforward method
  • False, Node.js doesn't support basic authentication

25. Node.js applications are run in a single-threaded event-driven model

  • I'm not sure, but I love .Net
  • False
  • True
  • What do you mean by thread??

26. Node.js is...

  • modular platform, meaning that much of the functionality is being built in to the platform
  • modular platform, meaning that much of the functionality is provided by external modules
  • modular platform, meaning that much of the functionality does not work without angular 2
  • modular what? I'm sorry, I wasn't paying attention

27. The reason Node.js uses event callbacks is

  • not to have to wait for blocking I/O
  • its creator didn't know how to use async/await
  • not to perform any I/O tasks from Node.js
  • to make it possible to work with promises

28. This is a software service that allows 2 applications to talk to each other.

  • SOAP
  • REST
  • API
  • Internet

29. How Node.js modules are available externally

  • module.exports
  • module.spread
  • module.expose
  • none of the above

30. Who createad NPM (Node Package Manager)?

  • Isaac Z. Schlueter
  • Ryan Dahl
  • Brendan Eich
  • Google

31. When did Ryan Dahl authored Node.js?

  • 2007
  • 2008
  • 2009
  • 2010

32. The parameters in order that a middleware function receives are:

  • next, res, req
  • req, res, next
  • es, req, next

33. Who made node.js?

  • Hampton Catlin
  • Ryan Dahl
  • Isaac Z. Schlueter
  • GitHub

34. When was the first non-Beta version of node was released?

  • 2014
  • 2013
  • 2015
  • 2016

35. Node.js is a JavaScript runtime environment built with Chrome's V8 JavaScript engine

  • False
  • True

36. What is the correct syntax for referring to an external script called “external.js”?

  • <script src=”external.js”>
  • <script href=”external.js”>
  • <script ref=”external.js”>
  • <script name=”external.js”>

37. Node.js runs on :

  • Browser
  • Client
  • Server

38. Node.js is available for the following operating systems

  • Mac OS, Linux
  • Windows, Mac OS, Linux
  • Linux
  • Windows, Mac OS

39. From the request object we can obtain:

  • params, data, method
  • params, query, variables
  • params, query, body
  • params, actions, body

40. Where is captured values are populated regarding route parameters?

  • req.params object
  • app.locals object
  • req.data object
  • none of the above

41. Which of the following technology is not used in Ajax

  • JavaScript
  • Document Object Model
  • XMLHttp Request
  • Flash

42. List all the modules that are installed globally

  • npm ls -g
  • npm ls
  • node ls -g
  • node ls

43. What language is nodejs based from

  • Javascript
  • PHP
  • Java
  • Nodered

44. This is a visual development environment for NodeJS

  • Netbeans
  • Eclipse
  • Node-Red
  • Visual Studio

45. Who developed ExpressJS?

  • TJ Holowaychuk
  • Ryan Dahl
  • Google
  • Jordan Walke

46. When was NPM created?

  • In January 2010
  • In August 2011
  • In February 2012
  • In April 2013

47. What platform popularized RESTful JSON API's?

  • Web Market
  • Mobile Game
  • Social Media

48. The $ npm ls statement is used to list down all the locally installed module?

  • True
  • False

49. JSON was a native construct of which language?

  • PHP
  • Java
  • Ruby On Rails
  • Javascript

50. When was Mongoose created?

  • February 2010
  • February 2011
  • February 2012
  • February 2013

Enjoyed the Quiz. Share this with friends

Comments

Add Your Review

Your email address will not be published.

Subscribe to Newsletter!

Subscribe to get latest updates and information.