wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Quiz on Express JS and Routing

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What is Express JS?

a)

A programming language

b)

A framework built on Node.js

c)

A database management system

d)

A web browser

2.

What does a route handler do?

a)

It creates new routes

b)

It runs when a route is accessed

c)

It manages database connections

d)

It sends emails

3.

Which HTTP method is used to submit a contact form?

a)

GET

b)

POST

c)

PUT

d)

DELETE

4.

What does req represent in a route handler?

a)

Response object

b)

Database object

c)

Request object

d)

Router object

5.

What is the purpose of route parameters?

a)

To create user sessions

b)

To manage database queries

c)

To handle dynamic data in routes

d)

To define static routes

6.

What does the query string in a URL start with?

a)

/

b)

&

c)

?

d)

#

7.

In the example app.get('/search', ...), what does req.query.name retrieve?

a)

The category of the search

b)

The URL path

c)

The search term

d)

The user's name

8.

What is the output of app.get('/users/:id', ...)?

a)

User ID is the value passed in the URL

b)

User ID is undefined

c)

User ID is a static number

d)

User ID is 0

9.

What does the app.get('/users/:id/profile', ...) example demonstrate?

a)

Static routing

b)

Combining route and query parameters

c)

Error handling

d)

Database interaction

10.

What is the output when visiting http://localhost:3000/users/10?

a)

User ID is 0

b)

User ID is 10

c)

User ID is 100

d)

User ID is not found