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

5. Is node js multithreaded?

  • Yes
  • No

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

  • Express.js
  • Geddy
  • Aurelia
  • Locomotive

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

8. How can we check the current version of NPM?

  • npm --ver
  • npm --version
  • npm help
  • None of the above

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

  • False
  • True

10. Command to show installed version of Node

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

11. How Node.js modules are available externally

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

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

  • True
  • False

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

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

14. NodeJs is ___________ Language.

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

15. When was MongoDB created?

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

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

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

17. When was NPM created?

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

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

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

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

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

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

  • JavaScript
  • Document Object Model
  • XMLHttp Request
  • Flash

21. When did Ryan Dahl authored Node.js?

  • 2007
  • 2008
  • 2009
  • 2010

22. What platform popularized RESTful JSON API's?

  • Web Market
  • Mobile Game
  • Social Media
  • Both A & B

23. Who developed ExpressJS?

  • TJ Holowaychuk
  • Ryan Dahl
  • Google
  • Jordan Walke

24. JSON was a native construct of which language?

  • PHP
  • Java
  • Ruby On Rails
  • Javascript

25. Which foundation was created with the joint effort of node and JS?

  • JsNode
  • ASpark
  • JNode
  • Joint

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

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

27. What does the fs module stand for?

  • File Store
  • File Service
  • File System
  • None of these

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

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

29. How many Node object methods are available?

  • 18
  • 19
  • 20
  • 21

30. The Express method that allows us to open a server on port 3000 is

  • app.server({ port : 3000 })
  • app.start({ port : 3000 })
  • app.on(3000)
  • app.listen(3000)

31. This is a visual development environment for NodeJS

  • Netbeans
  • Eclipse
  • Node-Red
  • Visual Studio

32. What language is nodejs based from

  • Javascript
  • PHP
  • Java
  • Nodered

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

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

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

36. From the request object we can obtain:

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

37. What is the default scope in NodeJs application.

  • Global
  • Private
  • Public
  • Local

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

  • next, res, req
  • req, res, next
  • es, req, next
  • none of the above

39. Node.js runs on :

  • Browser
  • Client
  • Server
  • All of above

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

  • 2014
  • 2013
  • 2015
  • 2016

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

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

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

  • fs
  • url
  • connect
  • http

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

  • True
  • False

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

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

46. To install Node.js express module

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

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

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

  • SOAP
  • REST
  • API
  • Internet

49. What is REPL in Node.js?

  • Loop
  • Print
  • Eval
  • All of these

50. Who createad NPM (Node Package Manager)?

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

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.