In short: good frontend developer interview preparation starts with JavaScript fundamentals, not with a framework or a pile of algorithm puzzles. Then you practise the rounds you’ll actually face. Expect to build a small user interface (UI) live and to answer JavaScript and CSS questions. Larger companies often add a data structures round, more senior roles add frontend system design, and most loops include a behavioral interview.
This guide ranks the topics by payoff and gives sample questions with the answer an interviewer expects. It also shows what gets scored, and a 4-week plan that fits around a full-time job at roughly 10 hours a week.
How frontend interviews work, and how they vary
A typical process, in our view, looks like a funnel. A recruiter call checks fit and salary range, then a technical interview screens your coding, often live in a shared editor.
A final loop of several interviews may follow, on site or by video. Some companies swap the screen for a take-home project.
What changes from one company to the next is the content of each round. One team asks you to code a page from a design file, while another asks you to implement a sorting algorithm on a whiteboard. Large companies tend to standardize their process, so expect computer science questions there. Startups and less technical companies care far more about how well you build interfaces, because that’s the daily job.
The cheapest preparation step is therefore a question: ask the recruiter which rounds you’ll face and whether you’ll code in plain JavaScript or a framework. In our view, that answer should decide where your hours go. The DOM (Document Object Model), mentioned below, is the tree of objects the browser builds from your HTML.
| Your target | Put most hours into | Avoid |
|---|---|---|
| Large tech company | JavaScript and DOM fundamentals, algorithms in JavaScript, frontend system design | Framework-only practice: fundamentals weigh more than framework tricks |
| Startup or product team | Building UI components live, React or the stack in the job post, performance | Weeks of hard algorithm problems you won’t be asked |
| Web agency or consultancy | Recreating a design pixel-close, responsive CSS, accessibility, talking through past projects | Arriving without a live project you can open and explain |
| First frontend job | HTML, CSS and modern JavaScript basics, two or three small projects you built yourself | Collecting tutorials you can’t rebuild without the video |
| Senior role | System design, performance, trade-offs, leadership stories | Answering design questions with a library name instead of reasoning |

What interviewers actually score you on
Interviewers rarely grade a coding round on “did it run”. They usually fill in a rubric, and the same signals come back across frontend loops:
- Clarifying the problem. Specifications you receive are often incomplete. Is the list paginated? Should it work on mobile? Does it need keyboard support?
- Approach before code. You explain a plan, compare two options and agree with the interviewer before typing.
- Communication. You think out loud, because the interviewer can only grade the reasoning they hear.
- Correctness and edge cases. Empty input, a single item, duplicates, a slow or failing network request.
- Code quality. Small reusable components and clear names, with no giant function.
- Frontend awareness. You mention accessibility, loading states and performance without being asked.
The last point is where frontend candidates stand out. One experienced engineer notes in his public study guide that he was rarely quizzed on accessibility, yet calling it out earned him credit. Knowing the most efficient answer is good. Knowing why and where to use it is better.
JavaScript fundamentals: questions and expected answers
When you don’t know what you’ll be tested on, study JavaScript. Every framework runs on it, and it’s the core of almost every frontend position. Focus on the core: closures, scope, this and the event loop. Then add the modern syntax that came with ES6 (ECMAScript 6, the 2015 edition of the language) and later editions, such as promises, spread and rest, and async/await.
“What is a closure?” A closure is a function that keeps access to the variables of the scope where it was created, even after that outer function has returned. A strong answer adds a real use, such as private state in a counter or a debounced handler. Interview Questions for Frontend Engineers tackles the same question from another angle.
“What does this print?” It’s the classic event loop question:
console.log('A');
setTimeout(() => console.log('B'), 0);
Promise.resolve().then(() => console.log('C'));
console.log('D');
The answer is A, D, C, B. Synchronous code runs first. Promise callbacks go to the microtask queue, which empties before the next task, so C beats the timer even at 0 ms.
“var, let or const?” var is scoped to the function and hoisted as undefined. let and const are scoped to the block, and const can’t be reassigned. A loop of setTimeout calls prints 3, 3, 3 with var but 0, 1, 2 with let.
“forEach or map?” map returns a new array built from the callback’s return values. forEach returns undefined and is meant for side effects.
“Implement debounce.” Expect this one live:
function debounce(fn, wait) {
let timer;
return function (...args) {
clearTimeout(timer);
timer = setTimeout(() => fn.apply(this, args), wait);
};
}
Practise its siblings too: throttle, Promise.all, a deep clone, flattening a nested array and an event emitter. These utility questions test closures, timers and promises in one go.

HTML, CSS and accessibility questions
HTML and CSS questions look easy and catch strong JavaScript developers off guard. The usual set covers:
- Semantic HTML: use elements that state their purpose, like
<nav>,<button>or<form>, because browsers, screen readers and search engines rely on them. - The box model: with
box-sizing: border-box, padding and border count inside the declared width. - Specificity: inline styles beat IDs, which beat classes, which beat element selectors, and
!importantoverrides them all. Say why you’d avoid it. - Flexbox or Grid: Flexbox lays items out along one axis, Grid handles rows and columns together.
- Responsive design: media queries, relative units such as
remand%, and responsive images.
Accessibility questions are rarer, but they can still come up. A useful one to prepare is “why not a div with a click handler?” A native <button> receives keyboard focus and responds to Enter and Space for free. WCAG 2.2 (the Web Content Accessibility Guidelines from the W3C) requires all functionality to work from a keyboard under success criterion 2.1.1. Criterion 1.1.1 asks for text alternatives, which is why the alt attribute matters.
Know the first rule of ARIA too. ARIA (Accessible Rich Internet Applications) adds roles and states to HTML. The W3C’s “Using ARIA” guidance says to prefer a native element whenever one exists. Quoting that rule in an interview shows judgement, not memorization.
DOM, browser APIs and rendering
JavaScript reads and changes the DOM through browser APIs, and DOM manipulation is a staple of frontend loops. Large companies tend to test it directly, because a framework hides it until something breaks. If you’ve used React for years, this is where rust shows. Many developers forget addEventListener, querySelector or fetch signatures, which slows them down in a plain JavaScript round.
Typical scenario questions and the answer expected:
- “What is event delegation?” One listener on a parent catches events that bubble up from its children. You find the item with
event.target.closest('li'), so it works for items added later. - “Live or static NodeList?”
childNodesupdates itself when the DOM changes.querySelectorAllreturns a snapshot that doesn’t. - “How do you add, move or remove nodes?”
createElement,append,insertBefore,remove, and aDocumentFragmentto batch many inserts. - “What causes a reflow?” Changing geometry such as width, position or font size forces the browser to recalculate layout. A repaint only redraws pixels, so it costs less.
Add HTTP basics (the protocol between browser and server): methods, status codes, caching headers and CORS, the rule that controls which other sites a page may call. Candidates who can consume an API properly, with loading and error states, stand out from those who only render static data.
React and framework questions
Learn your framework after the fundamentals, not instead of them, along with its best practices. React, Vue and Angular are the usual suspects. Match the one in the job post.
For React, expect these:
- “When does a component re-render?” When its state changes, when its parent re-renders, or when a context it reads changes. Then React compares the new output with the previous one and updates only the DOM nodes that differ. That comparison is called reconciliation.
- “Why do lists need keys?” The React documentation asks for keys that are unique among siblings and stable over time. An array index breaks when items are reordered or deleted, because state sticks to the wrong row.
- “When do you use useEffect?” To synchronize with something outside React, such as a subscription, a timer or a network request. The official article “You Might Not Need an Effect” lists the cases where it’s the wrong tool, like deriving data you can compute during render.
- “Controlled or uncontrolled input?” A controlled input takes its value from state, while an uncontrolled one keeps it in the DOM and you read it through a ref.
For mid-level roles, prepare an opinion on state management: local state, Context, or a library such as Redux or Zustand, and when each pays off. Senior candidates should explain server-side rendering (SSR, where the server sends ready HTML) against client-side rendering (CSR) with frameworks like Next.js. If the job post lists TypeScript, practise typing props and a generic function.

UI coding rounds and take-home projects
The UI round is the most frontend-specific part of the loop. You get a design or a short list of requirements and build it within the session. Published examples from real interviews include a log viewer, a poker hand generator and a phone input that formats digits as (123)456-7890.
Exercises worth practicing at least once, without a framework:
- an autocomplete field that calls an API, with debounce and keyboard navigation;
- tabs or an accordion that works with a keyboard;
- an infinite scroll feed that loads the next page near the bottom;
- a progress bar animated with CSS only;
- a to-do list with add, edit, delete and filters.
Componentize as you go, and say out loud which parts you’d reuse. Mention loading placeholders and keyboard support even when time runs short. In our view, those remarks are worth more than squeezing in one last feature.
Take-home projects are rarer, since they take as long to grade as an interview and plagiarism worries reviewers. If you get one, don’t follow a tutorial wholesale, because graders recognize copied code and its familiar bugs. Credit any snippet you borrowed in a comment. Then spend the spare time on a README (the file that explains how to run the project), tests and tidy code rather than extra features.
Data structures and algorithms: how much is enough
This is where opinions split most. Some excellent frontend engineers never pass an algorithms round and choose companies that judge public work instead. Big companies, on the other hand, usually keep at least one data structures and algorithms (DSA) interview. Depending on the committee, a weak result there may be forgiven for a strong frontend candidate, or may sink the whole loop.
Our recommendation is to aim for depth on a few patterns, not volume:
- Structures: arrays, objects and
Map/Set, stacks and queues, trees. - Patterns: two pointers, hashing for lookups, recursion, breadth-first search (BFS) and depth-first search (DFS) on trees.
- Complexity: explaining Big-O notation in plain words, for example why a loop inside a loop over the same input is O(n²).
Trees matter more than they seem, because the DOM is a tree. Traversing it, finding a node or serializing it are realistic frontend questions. Solve easy and medium problems on LeetCode or a similar site, and always in JavaScript, since that’s the language you’ll use on the day.

Frontend system design
System design used to mean back-end architecture. Frontend teams now run their own version, mostly for experienced hires: “design a news feed”, “design an autocomplete”, “design a photo gallery”. There’s no single right answer. The interviewer scores structure and trade-offs.
A sequence that keeps you on track:
- Requirements: features in and out of scope, devices, expected data volume, offline needs.
- Components: sketch the tree and say what each part owns.
- Data and API: the shape of the response, pagination by cursor or page, and where data is cached.
- State: what lives locally, what is shared, what comes from the server.
- Performance: list virtualization for long feeds, lazy loading of images, code splitting, rendering on server or client.
- Accessibility and failure states: focus management, errors, empty results.
Ground your performance optimization talk in public metrics. Google’s Core Web Vitals, measured at the 75th percentile of visits, set three thresholds for a good page:
- Largest Contentful Paint (LCP, main content shown) of 2.5 seconds or less;
- Interaction to Next Paint (INP, response to input) of 200 ms or less;
- Cumulative Layout Shift (CLS, visual stability) of 0.1 or less.
You’ll find the definitions on web.dev. Running Lighthouse on a site you built gives you concrete numbers to discuss.
The behavioral round and the questions you ask
Many frontend developers underprepare this round, and we think that’s a mistake. Interviewers want to know how you collaborate, take feedback, handle a vague problem and explain technical choices to non-developers.
Use the STAR method (situation, task, action, result) for every story. Prepare five or six stories that cover these themes:
- a hard bug you tracked down;
- a performance or accessibility improvement;
- a disagreement with a designer or product manager;
- a mistake you owned;
- a project you’d redo differently.
Write a one-page outline of your career story and review it before each interview so the details come easily.
Research the company and read the job post twice. Open their product, notice one thing you’d improve on the frontend, and be ready to say how. Expect a classic like “what would you optimize on our site?”, which rewards exactly that homework. Also pick one recent web platform feature you find exciting and practise talking about it for five minutes.
Prepare your own questions as well: how code goes from a pull request to production, how code reviews work, who owns accessibility. The interview runs both ways, and a bad interview experience often previews the job. The same instinct shows in the work of one agency that does this well.
When salary comes up, give a range rather than a single number. If you are interviewing at several companies, keep applying until you hold a firm offer.
A 4-week frontend developer interview preparation plan
One published estimate puts focused preparation at about 50 hours for someone with frontend experience, which it frames as 1 to 2 weeks full time or 4 weeks part time. The plan below is lighter, at around 10 hours a week, so about 40 hours in total: four weekday evenings of an hour and a longer weekend session.
Add hours if your algorithm skills are rusty, since that estimate assumes a solid base. Short daily sessions beat one long day, because recall needs repetition.
| Week | Weekday evenings | Weekend session | Done when |
|---|---|---|---|
| 1. JavaScript and DOM | Closures, this, event loop, promises; implement debounce, throttle, Promise.all |
Build tabs and an autocomplete in plain JavaScript | You explain each concept aloud without notes |
| 2. HTML, CSS, accessibility, framework | Box model, specificity, Flexbox and Grid, React rendering and hooks | Recreate a page from a screenshot, then make it keyboard-friendly | The page passes a keyboard-only test |
| 3. Algorithms and system design | Two or three easy-to-medium problems per evening on arrays, maps and trees | Talk through two designs out loud: a news feed and an autocomplete | You state complexity before you’re asked |
| 4. Mocks and behavioral | STAR stories, company research, your questions, revision of weak spots | Two timed mock interviews with a peer | Mock feedback no longer flags the same gap |
Adapt the split to your target. For a large tech company, move half of week 2’s framework time to algorithms. For an agency or startup, do the reverse and add a second UI build. Keep the last two days before the interview light, with a review of your cheat sheet and nothing new.

Mistakes that cost offers
- Symptom: you freeze in a plain JavaScript round. Cause: years of framework work hid the browser APIs. Fix: build three small components without React before the interview.
- Symptom: you solve hard puzzles but fail the UI round. Cause: hours spent on the wrong format. Fix: ask the recruiter about the rounds and plan from that answer.
- Symptom: you build the wrong thing and run out of time. Cause: you started typing straight away. Fix: spend the first minutes restating the task and asking about inputs, outputs and edge cases.
- Symptom: a correct solution, but feedback mentions “communication”. Cause: you coded in silence. Fix: narrate decisions and trade-offs as you go, and rehearse that in mocks.
- Symptom: behavioral answers ramble. Cause: stories invented on the spot. Fix: write your STAR stories down and time them at about two minutes each.
How to measure whether you’re ready
Feeling ready and being ready differ, so track a few signals each week. Timed drills come first. Example targets you can set yourself: a utility like debounce or Promise.all in about 15 minutes, and a small UI component in under 45, talking the whole time. Adjust them to the slot length your recruiter gives you.
Next, keep a list of every question you missed in practice and redo it three days later. Flashcard apps with spaced repetition, such as Anki, make this cheap for API details you can’t look up mid-interview.
Mock interviews give the only honest signal. Ask a peer to play interviewer with a problem you haven’t seen, and ask for written feedback on clarifying, communication and code quality. When two mocks in a row return no new weakness, you’re ready to book the real thing.
Free and paid resources compared
Free material covers almost everything if you’re disciplined. The Front End Interview Handbook explains each round. javascript.info and MDN (Mozilla’s web documentation) cover the language and browser APIs. The h5bp “Front-end Developer Interview Questions” repository on GitHub lists questions to test yourself, BigFrontEnd (BFE.dev) offers JavaScript and UI exercises, and LeetCode covers algorithms.
Paid interview prep platforms such as GreatFrontEnd sell structure. Expect a question bank of 500+ items with written solutions and study plans for 1 week, 1 month or 3 months. Company-tagged questions and an in-browser workspace with tests come on top. Billing runs by quarter, by year or as a one-off lifetime plan, and some employers reimburse it through a training budget.
| Approach | Cost | Time to organize | Best for |
|---|---|---|---|
| Free guides and repositories | None | High: you build your own plan | Self-directed developers with time |
| Paid prep platform | Subscription or one-off | Low: plans and tests are ready | Tight deadlines, big tech targets |
| Peer mock interviews | Free or paid | Medium: scheduling | Everyone, in the final week |
Our view: start free, and pay only if you can’t keep a schedule or you target companies whose question lists a platform tracks.
Your preparation checklist
- Ask the recruiter which rounds you’ll face, and in which language or framework.
- Explain closures,
this, the event loop and promises aloud. - Implement debounce, throttle and
Promise.allfrom memory. - Build two components in plain JavaScript, with keyboard support.
- Review the box model, specificity, Flexbox and Grid.
- Answer the core questions for the framework in the job post.
- Solve easy-to-medium problems on arrays, maps and trees, in JavaScript.
- Rehearse two frontend system designs out loud.
- Write five or six STAR stories and a career outline.
- Research the product and prepare three questions for them.
- Run two timed mock interviews and fix what they reveal.
- Keep the last two days for review only.
Frequently asked questions
Can I look things up on MDN during a live coding interview?
It depends on the interviewer, so ask at the start. Many allow quick documentation checks, but every lookup costs minutes. Learn the core APIs well enough that you only check exact argument orders.
Do I need TypeScript for a frontend interview?
Only if the job post lists it. Otherwise, ask whether plain JavaScript is fine for the coding rounds. If TypeScript is required, be ready to type component props, a fetch response and a simple generic function.
Can I use an AI coding assistant during the interview?
Rules differ from one company to the next, so ask the recruiter before the day rather than during the round. Where it’s allowed, you’ll still be judged on whether you can explain and fix every line. Practise without it so the fundamentals hold up either way.
What should I say when I don’t know the answer?
Say so honestly, then reason out loud about how you’d find out or what you’d try first. Interviewers value that more than a bluff they can spot. Note the question afterwards and add it to your practice list.
Is a portfolio worth more than interview practice?
It doesn’t replace practice, but it can change the interview. Some hiring managers turn the technical round into a walkthrough of code you’ve published and are proud of. Two or three live projects with readable code give you material for both the technical and behavioral rounds.
Frontend developer interview preparation pays off when it follows the real format of your interviews. Pick your interview date, ask the recruiter about the format today, and start week 1 with the event loop and a debounce from scratch. Everything else in this plan builds on those two.
Looking for more practical guides on modern web development? Browse our other articles on JavaScript, CSS and building fast, accessible sites.

