MERN Stack Internship Interview Questions for Freshers (with Answers)
By K. Boopathikumar, CEO & Founder · 16 November 2026 · 8 min read
MERN stands for MongoDB, Express, React and Node.js. One language, JavaScript, runs across the whole app, so interviewers often start with JavaScript itself before moving to each layer.
JavaScript
- What is the difference between let, const and var? let and const are block-scoped; var is function-scoped and hoisted. const stops reassignment, but an object declared with const can still be changed inside.
- What is a closure? A function that remembers the variables from where it was created, even after that outer function has returned. It is used for private state and callbacks.
- Explain promises and async/await. A promise represents a value that will arrive later. async/await lets you write promise code that reads top to bottom; wrap it in try/catch to handle errors.
- What is the event loop? JavaScript runs one thing at a time. Slow work (network, timers) is handed off, and its callback is queued; the event loop runs queued callbacks when the main code is free.
React
- What are props and state? Props are inputs passed from a parent and are read-only in the child. State is data a component owns and changes, which triggers a re-render.
- What does useEffect do? Runs code after rendering, such as fetching data. The dependency array controls when it runs again; return a cleanup function to cancel timers or subscriptions.
- Why do lists need a key? Keys let React match items between renders, so it updates only what changed. Use a stable id, not the array index, when items can be reordered.
- What is lifting state up? Moving shared state to the nearest common parent so sibling components can use and change the same data through props.
Node, Express and MongoDB
- What is middleware in Express? A function that runs between the request and the route handler, for logging, parsing JSON, checking login or handling errors. It calls next() to pass control on.
- SQL vs MongoDB? SQL databases store rows in fixed tables with joins; MongoDB stores flexible JSON-like documents. MongoDB suits data that changes shape; SQL suits strongly related data and complex reports.
- What is Mongoose? A library that adds schemas, validation and helper methods on top of MongoDB, so documents follow a consistent shape.
- How do you implement login? Hash passwords with bcrypt, check them at login, then issue a JWT or session. Protect routes with middleware that verifies the token.
- Where do you keep secrets such as the database URL? In environment variables (a .env file locally, the hosting settings in production), never in code or GitHub.
How to answer well in the interview
- Explain one feature of your project from button click to database and back.
- Know the difference between client-side and server-side validation and why you need both.
- Expect a small live task such as building a counter or a fetch-and-display list in React.
- Mention how you deployed the front end and the API separately and connected them.
Next steps
- Study the free MERN Stack learning path and take its module quizzes for a free certificate.
- Follow the MERN Stack skill track from basic to advanced.
- Do real, reviewed work in a MERN Stack internship and keep every project in your own GitHub.