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. What is a node?

  • A type of cryptocurrency
  • A Blockchain
  • A computer on a Blockchain network
  • An exchange

2. Node Js is

  • Synchronous
  • Asynchronous

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

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

4. Npm stands for

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

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

6. Is node js multithreaded?

  • Yes
  • No

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

  • Express.js
  • Geddy
  • Aurelia
  • Locomotive

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

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

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

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

  • False
  • True

11. Command to show installed version of Node

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

12. How Node.js modules are available externally

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

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

  • True
  • False

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

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

15. NodeJs is ___________ Language.

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

16. When was MongoDB created?

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

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

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

18. When was NPM created?

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

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

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

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

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

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

  • JavaScript
  • Document Object Model
  • XMLHttp Request
  • Flash

22. When did Ryan Dahl authored Node.js?

  • 2007
  • 2008
  • 2009
  • 2010

23. What platform popularized RESTful JSON API's?

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

24. Who developed ExpressJS?

  • TJ Holowaychuk
  • Ryan Dahl
  • Google
  • Jordan Walke

25. JSON was a native construct of which language?

  • PHP
  • Java
  • Ruby On Rails
  • Javascript

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

  • JsNode
  • ASpark
  • JNode
  • Joint

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

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

28. What does the fs module stand for?

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

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

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

30. How many Node object methods are available?

  • 18
  • 19
  • 20
  • 21

31. How do you supply a commit message to a commit? in git hub

  • 1 git commit file.js " I m coding{
  • 2 git commit file.js -m " I m coding"
  • 3 git add file.js " I m coding"
  • 4 git add file.js message = " I m coding"

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

33. This is a visual development environment for NodeJS

  • Netbeans
  • Eclipse
  • Node-Red
  • Visual Studio

34. What language is nodejs based from

  • Javascript
  • PHP
  • Java
  • Nodered

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

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

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

38. From the request object we can obtain:

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

39. What is the default scope in NodeJs application.

  • Global
  • Private
  • Public
  • Local

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

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

41. Node.js runs on :

  • Browser
  • Client
  • Server
  • All of above

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

  • 2014
  • 2013
  • 2015
  • 2016

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

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

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

  • fs
  • url
  • connect
  • http

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

  • True
  • False

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

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

48. To install Node.js express module

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

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

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

  • SOAP
  • REST
  • API
  • Internet

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.