Level 5 exam — harder

Exam — fresh questions

5.1 · Recall

1. What is TypeScript compared to JavaScript?

TS = JS + types: you declare types on top of your JavaScript, checked at compile time.
5.1 · Application

2. Salim passes a quantity as text where a number is expected. When is the error caught?

Static typing catches the inconsistency before execution — not at runtime or in production.
5.1 · Arbitration

3. Salim is starting out in JavaScript and wants to learn everything in strict TypeScript at once. Decision?

You only type well what you understand: JS first, types on top, step by step.
5.2 · Recall

4. Why is clustering necessary in Node?

Cluster or PM2: one instance per core to use the whole multi-core server.
5.2 · Application

5. Salim's API slows down: the same catalogue queries keep hitting the database. First lever?

Cache + query optimisation: often the most profitable lever, guided by measurement.
5.2 · Application

6. Salim wants to optimise without targeting the wrong thing. What approach?

Golden rule: measure before optimising — never blind premature optimisation.
5.3 · Recall

7. What does a Docker container hold?

The container ships its environment: it runs identically everywhere.
5.3 · Application

8. Salim's app works on his machine but not on his colleague's. What does he do?

Dockerfile + build + run: same image, same behaviour — no more “it works on my machine”.
5.3 · Application

9. Salim must bring up app + database for a newcomer with one command. Which tool?

Compose describes the whole stack: instant onboarding, reproducible identically.
5.4 · Application

10. Salim deploys his API: where do the secret key and database password go?

Secrets out of code, the Dockerfile and Git — provided by the environment.
5.4 · Arbitration

11. Salim is starting out and must put his API online fast. Which choice?

PaaS to start (simplicity); VPS for control when ready to take on maintenance.
5.4 · Arbitration

12. Before exposing real customer data, what must Salim do?

Sensitive data: IT-department validation, offers checked when choosing, HTTPS and monitoring in place.
What's next?
Back to the guideGuide contents