Loading

Quipoin Menu

Learn • Practice • Grow

express-js / Express.js Templating Engines
mcq
Direction: Choose the correct option

Q1.

What is a templating engine in Express?
A. A tool that allows embedding JavaScript into HTML to generate dynamic content
B. A CSS preprocessor
C. A routing library
D. A database query language
Direction: Choose the correct option

Q2.

How do you set the view engine to EJS in Express?
A. app.set('view engine', 'ejs')
B. app.set('engine', 'ejs')
C. app.engine('ejs')
D. app.use('view engine', 'ejs')
Direction: Choose the correct option

Q3.

Which method renders a view and sends the HTML to the client?
A. res.sendFile()
B. res.view()
C. res.send()
D. res.render()
Direction: Choose the correct option

Q4.

Where does Express look for view templates by default?
A. In the public folder
B. In a folder named views
C. In a folder named templates
D. In the project root
Direction: Choose the correct option

Q5.

In EJS, how do you output a variable named username?
A. {{ username }}
B. <%= username %>
C. @username
D. ${username}