Interview prep · Technology
Web Developer interview questions and answers
Interviewers for web developer roles want to know whether you can build and ship reliable full-stack features with JavaScript, React, Node.js, and databases, and whether you can reason through problems out loud. They also look for clear communication, sound judgment under deadlines, and the ability to work well in an agile team. Expect a mix of technical questions, past-experience stories, and realistic what-would-you-do scenarios.
Question 1
Tell me about yourself.
What they're asking: The interviewer wants a concise summary of your experience, your technical strengths, and why this role fits you.
Sample answer
I'm a web developer with [X years] of experience building full-stack applications, mostly with React on the front end and Node.js on the back end. Most recently at [company/project], I owned [a feature or product], using PostgreSQL for data and deploying on AWS, which [result, e.g., made checkout faster or cut support requests]. I also use Python for [scripting, data cleanup, or automation]. I enjoy working in agile teams, and I've [mentored junior developers / helped run sprint planning / coordinated releases]. What draws me to this role is [specific reason tied to the job posting], and I'm excited to bring a mix of hands-on coding and collaboration to your team.
Question 2
How does the event loop work in Node.js, and how do you handle asynchronous code and errors?
What they're asking: The interviewer is checking whether you understand how Node handles concurrency and can write non-blocking, resilient back-end code.
Sample answer
Node runs JavaScript on a single thread with an event loop. I/O like database calls and HTTP requests is handed off, and the results are processed through callbacks, promises, or async/await continuations when they finish. Since async/await is syntax over promises, I wrap awaited calls in try/catch or use centralized error-handling middleware in Express. The main risk is CPU-heavy work, like large data transforms, which blocks the loop and stalls every request. For that, I'd use a worker thread, a job queue, or a separate service. I also use Promise.all for independent calls rather than awaiting them one by one. On [project], I applied this to [specific example, e.g., an endpoint that fetched data from several sources].
Question 3
When would you choose MongoDB over PostgreSQL, or the other way around?
What they're asking: The interviewer wants to see that you choose tools based on data shape and requirements rather than habit.
Sample answer
I start with the shape of the data and how it will be queried. PostgreSQL is my default when data is relational and consistency matters, like users, orders, and payments, because I get foreign keys, transactions, and powerful SQL. MongoDB fits when documents are naturally nested and read together, the schema changes often, or I'm storing varied content like event data or product catalogs with differing attributes. With either one, I design indexes around real queries. Neither is automatically faster, and poor modeling hurts both. On [project], I chose [database] because [reason], and I accessed it with [Mongoose/Prisma/raw SQL]. I'd also weigh what the team already knows and can support in production.
Question 4
A React page feels slow because a component re-renders too often. How would you diagnose and fix it?
What they're asking: The interviewer is testing your React fundamentals and whether you measure before optimizing.
Sample answer
I'd start by confirming the problem with the React DevTools Profiler to see which components re-render and why. Common causes are state held too high in the tree, new object or function references passed as props on every render, or expensive calculations running each time. Then I'd fix the specific cause: move state closer to where it's used, split components, and use React.memo, useMemo, or useCallback only where profiling shows a benefit. For long lists, I'd consider virtualization. I avoid memoizing everything because it adds complexity without guaranteed gains. I'd also check whether data fetching needs caching, debouncing, or pagination. On [project], I used this approach on [page or component] and confirmed the improvement by [how you measured it].
Question 5
Tell me about a time you led a project or guided teammates.
What they're asking: The interviewer wants evidence of leadership and project management, even without a formal title.
Sample answer
Situation: On [project], our team of [number] needed to deliver [feature] by [deadline], and our lead was pulled onto another priority. Task: I was asked to coordinate the work and keep us on track. Action: I broke the feature into tickets, ran short daily check-ins, and paired a newer developer with a more experienced one on the API work. I set up a shared board so blockers were visible, and I flagged a risk to the product owner early so we could trim scope. Result: We shipped [the core feature] on [time], and the teammate I paired with went on to [handle similar tasks independently]. I learned that clear ownership and early communication matter more than trying to do everything myself.
Question 6
Describe a time you had to juggle competing deadlines.
What they're asking: The interviewer is assessing your time management, prioritization, and willingness to communicate early.
Sample answer
Situation: At [company/project], I was building [feature A] while also responsible for fixing [bugs] before a [release date]. Task: I had to deliver both without sacrificing quality. Action: I listed everything, estimated each piece, and met with my manager to confirm priorities. We agreed the release-blocking bugs came first. I time-blocked focused coding hours, batched code reviews into set times, and split [feature A] into smaller pull requests so it could be reviewed incrementally. When one estimate slipped, I said so right away and proposed deferring [lower-priority piece]. Result: We released on schedule with the blockers fixed, and [feature A] followed in the next sprint. Since then I build buffer into estimates and communicate changes early.
Question 7
Tell me about a time you had to explain a technical issue to a non-technical person.
What they're asking: The interviewer wants to know if you can communicate tradeoffs clearly and build trust with stakeholders.
Sample answer
Situation: On [project], a non-technical stakeholder asked for [feature], but my team knew it would require [major change, e.g., restructuring part of the database]. Task: I needed to explain the tradeoffs and find a workable path. Action: I avoided jargon and described it in business terms: the time it would take, the risk involved, and the alternatives. I prepared a short comparison of two options with a rough timeline for each, and I asked what they needed the feature to accomplish. Result: They chose [the simpler option] that met their goal, we avoided [a risky rewrite], and they started involving me earlier in planning. It reinforced for me that listening first makes technical explanations land better.
Question 8
Tell me about the hardest bug you've debugged.
What they're asking: The interviewer is looking at your problem-solving process, persistence, and how you prevent repeat issues.
Sample answer
Situation: After a release on [project], users reported [intermittent issue, e.g., data not saving], and I couldn't reproduce it locally. Task: I was responsible for finding the root cause. Action: I reviewed logs and monitoring, noticed failures clustered around [particular requests], and added targeted logging. I wrote a Python script to [replay sample requests / analyze the logs], which revealed [a race condition / missing index / unhandled null case]. I wrote a failing test first, fixed the problem, and had a teammate review the change. Result: The issue stopped after the fix was deployed, and I added [a test / an alert / documentation] to catch similar problems sooner. The experience taught me to gather evidence before guessing.
Question 9
Midway through a sprint, a stakeholder asks you to add an urgent feature. What do you do?
What they're asking: The interviewer wants to see how you apply agile principles and handle shifting priorities without hurting the team.
Sample answer
First I'd clarify what's actually urgent and why, since urgent can mean different things to different people. Then I'd estimate the effort and what it would displace. In an agile team the sprint commitment matters, so I'd bring it to the product owner and the team, show the impact, and ask which items should come out to make room, rather than silently absorbing the work. If it's a true emergency, I'd propose the smallest version that solves the immediate need and schedule the rest for the next sprint. I'd also make sure the change is visible on the board. If this happens repeatedly, I'd raise it in the retrospective so we can improve how work is prioritized.
Question 10
You deploy a release to AWS and errors spike in production. What are your next steps?
What they're asking: The interviewer wants to see a calm, structured response to incidents, including rollback, communication, and prevention.
Sample answer
My first priority is limiting user impact. I'd confirm the problem using monitoring and logs, such as CloudWatch or whatever tools we have, and tell the team in the incident channel. If the errors clearly come from the release, I'd roll back to the last stable version through our deployment process, or use git revert to create a clean change and redeploy, rather than debugging live in production. Once things are stable, I'd reproduce the issue in a lower environment, find the root cause, add a test, and ship the fix through normal review. Afterward I'd join a blameless postmortem to discuss improvements like staging checks, feature flags, or better alerts.
How to prepare
- Rebuild a small full-stack feature from scratch, such as a React form posting to a Node API that saves to PostgreSQL or MongoDB, so you can discuss every layer.
- Review ES6+ essentials you may be asked to explain or code live: closures, promises, async/await, destructuring, array methods, and how `this` behaves.
- Practice solving coding problems out loud in a plain editor, narrating your approach, edge cases, and tradeoffs before you write code.
- Prepare four or five STAR stories from your own work covering leadership, deadlines, conflict, and debugging, with real details in place of placeholders.
- Be ready to walk through your Git workflow and a basic AWS deployment, including branching, pull requests, rollbacks, and how you'd monitor an app after release.
Questions to ask the interviewer
- What does the development workflow look like from ticket to production, including code review, testing, and deployment?
- How does the team handle technical debt and balance it with new feature work?
- What would success look like in the first 90 days for someone in this role?
- How are priorities set and changed during a sprint, and how does the team communicate with product and stakeholders?
Practice out loud
A mock interview asks you questions like these for your own resume and the job you want, and gives feedback on every answer.