Full Stack JavaScript Developer Interview Questions & Answers
40 questions for Full Stack JavaScript Developer interviews — 4 easy, 30 medium, 6 hard.
About the Full Stack JavaScript Developer role
A Full Stack JavaScript Developer with two to five years of experience owns features end to end and makes design decisions on both sides. You plan data models, API contracts and frontend state together, review code, write tests and handle deployments. Companies expect you to balance speed with quality, debug across layers, and support juniors while delivering modules independently and on schedule.
Users must upload files up to 200 MB. How would you handle this in a MERN application?
Show answer
Write a reusable validation middleware for Express using zod.
Show answer
Write an aggregation that counts orders and sums revenue per status.
Show answer
How is Docker used in a MERN project?
Show answer
What is the Context API and when should you avoid it?
Show answer
What is the difference between server state and client state, and why use a library like TanStack Query?
Show answer
What does lean() do in Mongoose and when should you use it?
Show answer
An error in one dashboard widget crashes the entire React page. How do you contain it?
Show answer
Write an Express router with CRUD routes for a products resource.
Show answer
How would you achieve zero-downtime deployments for an Express API?
Show answer
How would you explain a technical decision, such as choosing REST over GraphQL, to a non-technical manager?
Show answer
Some tests pass locally but fail randomly in CI. How do you handle flaky tests?
Show answer
What does a CI/CD pipeline for a MERN application usually include?
Show answer
When should you embed documents and when should you reference them in MongoDB?
Show answer
What is the difference between req.params, req.query and req.body?
Show answer
Write a GitHub Actions workflow that tests and builds a MERN project on every pull request.
Show answer
What is CORS and how do you configure it in an Express API?
Show answer
What are Mongoose middleware hooks and give a common use case.
Show answer
How have you helped junior developers improve their React skills?
Show answer
How do you implement code splitting in a React app?
Show answer
Your Express API slows down badly during peak traffic. How do you find and fix the bottleneck?
Show answer
Compare offset-based and cursor-based pagination for an API.
Show answer
What are the core principles of a RESTful API, and which HTTP methods are idempotent?
Show answer
Walk me through a MERN project you built, end to end.
Show answer
What is a custom hook and what rules must hooks follow?
Show answer
How would you structure the folders of a production Express API?
Show answer
A for loop using var with setTimeout inside prints 3, 3, 3 instead of 0, 1, 2. Why, and how do you fix it?
Show answer
Write a reusable useFetch custom hook.
Show answer
The business wants total sales per category for the last 30 days. How would you build it in MongoDB?
Show answer
How would you use Redis caching in a MERN backend and what are the pitfalls?
Show answer
A MongoDB query on an orders collection takes 3 seconds. How do you diagnose and fix it?
Show answer
Write an asyncHandler wrapper for Express 4 route handlers.
Show answer
When should you use useReducer instead of useState?
Show answer
Props are being passed through five levels of components that do not use them. How would you refactor?
Show answer
Show the use of $push, $addToSet, $inc and $pull update operators.
Show answer
Describe a mistake you made with data and how you handled it.
Show answer
Write a production Dockerfile for a Node.js Express API.
Show answer
What is PM2 and why is it used to run Node.js in production?
Show answer
Explain the core ideas of Redux Toolkit.
Show answer
Frequently asked questions
What does a Full Stack JavaScript Developer do?
A Full Stack JavaScript Developer with two to five years of experience owns features end to end and makes design decisions on both sides. You plan data models, API contracts and frontend state together, review code, write tests and handle deployments. Companies expect you to balance speed with quality, debug across layers, and support juniors while delivering modules independently and on schedule.
Which skills are tested in a Full Stack JavaScript Developer interview?
Expect questions on Feature ownership, API design, React performance, Automated testing, CI/CD. Most rounds also ask you to explain a project and solve one practical problem live.
How do I prepare for a Full Stack JavaScript Developer interview?
Revise React Hooks, State and Performance, Express.js and REST APIs, MongoDB and Mongoose, Testing, Deployment and DevOps first using the topic sheets, practise the questions on this page aloud, then do one full mock interview to practise timing.