download

Frontend Interview Questions

Practice JavaScript, TypeScript, CSS, React, accessibility, and performance with free frontend interview questions. Each exercise includes hints and an answer you can compare with your own.

Frontend12 questionsFree · No sign-in

Practice questions

  1. Which runs first, Promise callbacks or setTimeout? · Event loop · 5 min
  2. Why does a CSS class beat this ID selector? · CSS cascade · 5 min
  3. How do you stop stale search results overwriting newer ones? · Browser requests · 6 min
  4. How should a modal dialog manage keyboard focus? · Accessibility · 6 min
  5. Why is INP poor when LCP is good? · Web performance · 6 min
  6. Why does this React component fail to hydrate? · React rendering · 6 min
  7. Why does res.json() as Invoice let bad API data slip in? · TypeScript validation · 7 min
  8. Why do separate UI booleans allow impossible screen states? · Discriminated unions · 7 min
  9. Why does rows[idx].email type-check and still crash at runtime? · Type narrowing · 7 min
  10. Why does copying props into useState with useEffect cause bugs? · React derived state · 7 min
  11. Why does React StrictMode run useEffect twice, and what breaks? · React effects · 8 min
  12. Why do tests of internal state and CSS classes fail refactors? · Component testing · 8 min

How to practice

Predict the result or explain what you would change before opening the hints. Then compare your reasoning with the answer and try the follow-up question.

Open the interactive Frontend deck →