Level 3 exam — harder

Exam — fresh questions

3.1 · Recall

1. In Express, you recognise middleware by…

It acts during processing then calls next() or responds.
3.1 · Application

2. Salim wants product page 7 via /produits/7. He writes…

Dynamic route: the segment is captured in req.params.id.
3.1 · Arbitration

3. Salim’s request stays stuck with no response. Correct decision?

A forgotten next() blocks the pipeline; validating before parsing reads emptiness.
3.2 · Recall

4. express.static('public') and res.render() respectively…

Static for fixed assets, templates for dynamic HTML (SSR).
3.2 · Application

5. Salim renders the product page in EJS. He writes…

The views/ view receives the data and produces the HTML.
3.2 · Application

6. Showcase pages to reference + highly interactive dashboard. Salim decides…

Content/SEO → SSR; interactive app → API + separate front end.
3.3 · Recall

7. MongoDB versus SQL is first of all…

Flexible documents close to JS, versus strict tables and rows.
3.3 · Application

8. Salim enforces a required, unique email on his users. He writes…

The Mongoose schema validates before saving.
3.3 · Arbitration

9. Salim hesitates between MongoDB and PostgreSQL for linked invoicing. Correct decision?

Choose by data nature, not by fashion.
3.4 · Application

10. Salim lists active clients with Prisma. He writes…

Typed ORM method generating safe parameterised SQL.
3.4 · Application

11. In raw SQL (pg), Salim filters by entered email. Safe version?

The $1 placeholder separates code from data: no injection.
3.4 · Arbitration

12. A colleague suggests concatenating input “just for testing”. Correct decision?

Injection is born from concatenation; the safe habit allows no exception.
What's next?
Back to the guideGuide contents