Loading...
QUIZ

Certification Test

 
Que No. 1 ) Which template engine is often used with Express.js for rendering dynamic web pages?

A.) JSON
B.) Pug (formerly Jade)
C.) Markdown
D.) EJS (Embedded JavaScript)


Que No. 2 ) What is the role of the app.get() method in Express.js?

A.) To retrieve data from a database
B.) To define a new route for handling GET requests
C.) To send an HTTP GET request to an external server
D.) To configure session management


Que No. 3 ) What is the purpose of the req and res objects in Express.js middleware functions?

A.) To read data from the database
B.) To manage session cookies
C.) To represent the HTTP request and response, respectively
D.) To define URL patterns


Que No. 4 ) How can you install Express.js in a Node.js project?

A.) Using the npm install express command
B.) By downloading it from the official website
C.) By cloning the Express.js GitHub repository
D.) Express.js is included by default in Node.js


Que No. 5 ) What is Express.js' built-in middleware used for serving static files (e.g., HTML, CSS, JavaScript)?

A.) express-static
B.) express-serve
C.) express-files
D.) express.static


Que No. 6 ) What is Express.js' middleware used for handling cookies and sessions?

A.) express-session
B.) express-cookies
C.) cookie-parser
D.) express-middleware


Que No. 7 ) What is the role of the app.post() method in Express.js?

A.) To configure SSL certificates
B.) To define a new route for handling POST requests
C.) To serve static files
D.) To retrieve data from a database


Que No. 8 ) Which Express.js middleware is commonly used for parsing JSON in incoming requests?

A.) body-parser
B.) json-parser
C.) express-json
D.) request-json


Que No. 9 ) What is the purpose of the app.put() method in Express.js?

A.) To define a new route for handling PUT requests
B.) To serve static files
C.) To retrieve data from a database
D.) To configure SSL certificates


Que No. 10 ) What is Express.js' middleware used for handling form data in incoming requests?

A.) form-parser
B.) express-forms
C.) body-parser
D.) form-handler