MEAN Study Guide 2026
Everything you need to pass the MEAN exam in one place: the exam format, every topic to study, real practice questions with explanations, flashcards, and full-length practice tests. Free, no sign-up needed.
📋 MEAN Exam Format at a Glance
📚 MEAN Topics to Study (77)
✍️ Sample MEAN Questions & Answers
1. When using PM2 to deploy a Node.js application, what does the '--watch' flag do in a production environment?
PM2's --watch flag restarts the application whenever file changes are detected, which is useful in development but generally avoided in production to prevent unintended restarts.
2. What is returned by the subsequent expression? round(-20.51) =
The expression Math.round(-20.51) returns the value -21. The Math.round() function in JavaScript is used to round a number to the nearest whole number. When applied to -20.51, it rounds the number to the nearest integer value. Since -20.51 is closer to -21 than to -20, the result is -21.
3. Which RxJS operator should you use to handle errors inside an Observable pipeline without terminating the stream?
catchError() intercepts an error in the Observable chain, allowing you to return a fallback Observable (e.g., of([]) or EMPTY) so the stream continues or completes gracefully rather than propagating the error to the subscriber.
4. What does the `--save-dev` flag do when used with `npm install`?
The --save-dev flag adds the package to devDependencies in package.json, indicating it's only needed during development and testing, not in production.
5. Which MongoDB write concern value ensures acknowledgment from a majority of replica set members?
Write concern { w: 'majority' } ensures the primary and a majority of secondaries have confirmed the write before acknowledging success.
6. What is CSRF (Cross-Site Request Forgery) and how is it mitigated in Express?
CSRF attacks submit unauthorized requests using the victim's credentials; CSRF tokens embedded in forms or SameSite cookie attribute prevent cross-origin request forgery.