Olete.in
Articles
Mock Tests
🧪 Express.js MCQ Quiz Hub
Express.js Mcq Question Set 1
Choose a topic to test your knowledge and improve your Express.js skills
1. Who is credited as the developer of Express.js?
Larry wall
Rich Hickey
TJ Holowaychuk
Rob Pike
2. Which of the following are the core features of the Express framework?
It allows us to set up middleware to respond to HTTP Requests.
It defines a routing table that can work as per HTTP Method and URL.
It is used to render the HTML pages dynamically.
All of the above.
3. In which of the following year was Express.js initially released?
November 2010
November 2011
December 2010
December 2011
4. What is the way to store local variables that can be accessed within the application?
Using Config file
Using database
Using app.locals
Using app.storage
5. In combination with a request method, root paths define the endpoints at which requests can be made. Which of the following are valid forms of route path?
strings
string patterns
regular expressions
All of the above
6. Where are the captured values populated regarding the route parameters?
req.data
app.locals
req.params
All of the above
7. How is it possible to create chainable route handlers for a route path in Express.js?
Using app.route()
Using app.routes()
Using app.router()
Using app.routing()
8. Which of the following function arguments are available to Express.js Route handlers?
req - the request object
res - the response object
next
All of the above
9. Which of the following is the Scaffolding in Express.js?
Yeoman
Express application generator
Handler functions
Both A & B
10. In Express.js, the method app.all(path, callback [, callback ...]) can accept all HTTP methods:
True
False
Insufficient data
none of the above
11. Which of the following is a middleware in Express.js?
function(req){ }
method(req){ }
function(req,res,next){ }
method(req,res,next){ }
12. Which of the following is the correct statement in the context of Express.js?
Express is a minimal and flexible Node.js web application framework.
Express is a minimal and flexible React.js web application framework.
Express is a minimal and flexible Redux.js web application framework.
Express is a minimal and flexible Angular.js web application framework.
13. Which of the following is the correct syntax to use Express.js in Node?
var = require('express')();
var_require('express')();
var app = require('express')();
None of the above.
14. What is the meaning of templating in Express.js?
Pug
EJS
Mustache
All of the above.
15. To use Mongo with Express.js, we need a client API for node.
TRUE
FALSE
Can be true or false
cannot say
16. Which of the following facilitates us to create a skeleton for a web application easily?
Authentication
APIs
Debugging
Scaffolding
17. Which of the following is a middleware that parses cookies attached to the client request object?
cookie
cookies
cookie-parser
none of the above
18. The method of using values is called?
filters
interpolation
inheritance
includes
19. Which of the following command is used to check the current version of NPM?
nmp --ver
npm --version
npm help
None of the above.
20. In Express.js, the method app.all(path, callback [, callback ...]) is:
True
False
Cannot say
None of the mentioned
21. Which of the following method requests that the server accept the data enclosed in the request to modify an existing object identified by the URI?
GET
DELETE
PUT
Post
22. Which of the following statement is correct in the case of backlog arguments?
A port number on which the server should accept incoming requests.
The backlog argument is the name of the domain.
The maximum number of queued pending connections.
An asynchronous function is called when the server starts listening for requests.
23. Which of the following was the earlier name of the Pug?
Terse
DRY
Express
Jade
24. Which of the following function is used to specify what to do when a get request at the given route is called?
app.get(route, callback)
get(route, callback)
js.get(route, callback)
fun.get(route, callback)
25. Where are the captured values populated regarding route parameters?
app.locals object
req.data object
req.params object
None of the above.
26. Cookies are the complex, large files/data sent to the server with a client request and stored on the server-side.
This statement is true.
This statement is false.
Can be true or false
Cannot say.
27. HTTP is stateless.
This statement is true.
This statement is false.
It can be true or false.
Cannot say.
28. Express is a minimal and flexible _______ web application framework.
Node.js
React.js
Redux.js
Angular.js
29. Express.js, or simply Express, is a _________ web application framework for Node.js
Front-end
Back-end
Database
none of the above
30. Pug earlier known as ?
Terse
DRY
Express
Jade
31. backlog arguments defines as?
A port number on which the server should accept incoming requests.
Name of the domain
The maximum number of queued pending connections
An asynchronous function that is called when the server starts listening for requests.
32. Which method requests that the server accept the data enclosed in the request as a modification to existing object identified by the URI?
GET
DELETE
PUT
Post
33. This method of using values is called ?
filters
interpolation
inheritance
includes
34. What are core features of Express framework?
Allows to set up middlewares to respond to HTTP Requests
Defines a routing table which can works as per HTTP Method and URL
Dynamically render HTML Pages
All of the above
35. _____ is a middleware which parses cookies attached to the client request object.
cookie
req.cookies
cookie-parser
none of the above
36. ________ allows us to easily create a skeleton for a web application
Authentication
APIs
Debugging
Scaffolding
37. In order to use Mongo with Express, we need a client API for node.
TRUE
FALSE
Can be true or false
Can not say
38. What will be the output of the below code in the console? File: my_module.js exports.name = 'Zeus'; Code: var my_module = require('./mymodule'); console.log((function(settings){ return settings.split('').reverse().join('') })(my_module.name));
Error
Zeus
undefined
sueZ
39. How to store local variables that can be access within the application?
Using app.locals
Using app.storage
Using database
Config file
40. Route paths, in combination with a request method, define the endpoints at which requests can be made. Which of following are valid form of route path?
strings
string patterns
regular expressions
All of above
41. Where is captured values are populated regarding route parameters?
req.params object
app.locals object
req.data object
None of above
42. What function arguments are available to Express.js Route handlers?
req - the request object
res - the response object
next
All of the above
43. How can we create chainable route handlers for a route path in ExpressJS app?
Using app.route()
Using app.router()
Using app.routing()
All of these
44. What are the commands are used to enable debugging in Express App?
Linux
Windows
Both A and B
None
45. In ExpressJS, the method app.all(path, callback [, callback ...]) can accept all HTTP methods
True
False
Insufficient data
None of the mentioned
46. Who was developed by Express.Js ?
Larry wall
TJ Holowaychuk
Rob Pike
Rich Hikey
47. Express.Js was initilay released in
November 2010
November 2011
December 2010
December 2011
48. What are core features of Express framework ?
table which can works as per HTTP Method and URL
Dynamically render HTML Pages
Allows to set up middlewares to respond
All of the above
49. Where is captured values are populated regarding route parameters are:
req.data
app.locals
req.params
Both A & B
50. How can we create chainable route handlers for a route path in ExpressJs ?
Using app.route()
Using app.routes()
Using app.router()
Using app.routing()
Submit