Interview questions
Frontend developer interview questions
Frontend interviews mix fundamentals with practical judgment. You will be asked how JavaScript actually works, then asked to build something in front of someone, then asked why the page you shipped last year was slow.
Questions by stage and what a strong answer includes
- 01
What stack are you working with now?
Strong answer: Framework and version (React, Vue, Angular), TypeScript or not, state management, build tooling, testing libraries. Mention the size of the codebase and team.
- 02
What is the most complex UI you have built?
Strong answer: A specific feature with real complexity: a data grid, a real-time editor, an offline-first form. Explain what made it hard in one or two sentences.
- 03
Tell me about a performance problem you fixed.
Strong answer: How you measured it (Lighthouse, Web Vitals, profiler), the root cause, the fix and the before and after numbers.
- 04
Describe a disagreement with a designer about how something should work.
Strong answer: The constraint you raised, the options you offered, and how you landed on something buildable that kept the design intent.
- 05
Explain the event loop, and what happens with a promise and a setTimeout scheduled together.
Strong answer: Call stack, microtask and macrotask queues, and why the promise callback runs first. A small example out loud is better than a definition.
- 06
When does a React component re-render, and how do you prevent unnecessary renders?
Strong answer: State, props or context change, parent re-render. Memoization with React.memo, useMemo and useCallback where profiling shows a cost, plus keeping state close to where it is used.
- 07
Live coding: build an autocomplete input that queries an API.
Strong answer: Debounce requests, cancel stale ones, handle loading, empty and error states, keyboard navigation and ARIA roles. Talk through trade-offs while you code.
- 08
How do you make a custom dropdown accessible?
Strong answer: Correct roles and states, keyboard support (arrows, Enter, Escape), focus management and screen reader testing. Or use a native select when possible.
- 09
System design: design the frontend for a news feed with infinite scroll.
Strong answer: Data fetching and caching, pagination with cursors, list virtualization, image loading strategy, optimistic updates and error recovery. Clarify scale and devices first.
- 10
How do you approach testing on the frontend?
Strong answer: Unit tests for logic, component tests with Testing Library around user behavior, a small set of end-to-end tests for critical flows. Explain what you would not test.
- 11
What level are you targeting, and what do you want to grow into?
Strong answer: Clear level with reasons, and a direction such as frontend architecture, design systems or full-stack work. Ask how levels are calibrated.
One answer, before and after
Tell me about a performance problem you fixed.
Weak answer
Our app was slow, so I optimized it. I used memoization and lazy loading and it became much faster. Users were happy.
Strong answer in STAR
- Situation
- The product listing page of an e-commerce site had a Largest Contentful Paint of 4.8 seconds on mobile, and the SEO team flagged it as failing Core Web Vitals.
- Task
- I was asked to bring LCP under 2.5 seconds on a mid-range Android device without a redesign.
- Action
- I profiled the page and found the hero image was lazy-loaded by mistake, the main bundle included a 300 KB charting library used only on another page, and fonts blocked rendering. I preloaded the hero image with proper sizes, split the chart library into its own chunk and switched fonts to swap with a preload.
- Result
- LCP dropped to 2.1 seconds at the 75th percentile and the JavaScript bundle shrank by 38%. Over the next month mobile bounce rate on the page went down from 52% to 46%.
Why it works
The weak answer names techniques with no measurement. The strong one starts from a metric, finds three concrete causes and proves the effect with numbers. These numbers are illustrative: use your own measurements.
How a practice session works
- 01
Pick a stage, paste the job posting
Recruiter screen, HR interview, hiring manager, final round or offer talk. Add the posting and your resume so the questions are about your role, not generic.
- 02
Talk it through by voice
The interviewer speaks the language you chose, interrupts, follows up and digs into details like on a real call. If the connection drops, you pick up where you stopped.
- 03
Get the review and drills
A score, 7 skills, what you said next to a stronger way to say it, plus pace, filler words and talk share. Weak spots turn into short drills.