I've been on both sides of the frontend interview table more times than I can count. As a candidate, I bombed my first three interviews before landing at a company that changed my career. As an interviewer, I've evaluated hundreds of candidates and seen the same patterns repeat: talented developers failing because they prepared for the wrong things, and average developers succeeding because they understood what interviewers actually look for.
This guide is everything I wish someone had told me before that first interview. Not just a list of questions—there are plenty of those online—but a complete roadmap for understanding how frontend interviews work and how to demonstrate that you're the developer they need.
What Frontend Interviews Actually Test
Let's be honest about something: frontend interviews aren't designed to find the "best" developer. They're designed to find someone who can do the job, communicate effectively, and won't be a nightmare to work with. Technical skills matter, but they're just part of the equation.
Here's what interviewers are really evaluating:
Technical competence - Can you write working code? Do you understand the fundamentals? This is table stakes.
Problem-solving approach - How do you break down problems? Do you ask clarifying questions? Can you adapt when your first approach doesn't work?
Communication skills - Can you explain your thinking? Do you listen to hints? Would you be effective in code reviews and team discussions?
Cultural fit - Are you someone the team wants to work with? Do you handle feedback well? Are you curious and willing to learn?
The technical portion tests hard skills. Everything else tests whether you'd be a good colleague. Both matter equally.
The Frontend Interview Structure
Most companies follow a similar pattern, though the specifics vary:
Phone Screen (30-45 minutes)
Usually with a recruiter or hiring manager. They're checking basic qualifications, salary expectations, and whether you can hold a conversation. Don't underestimate this—I've seen candidates eliminated here for being arrogant or dismissive.
Technical Phone Screen (45-60 minutes)
A developer asks you coding questions, usually shared via a collaborative editor. Expect JavaScript fundamentals, maybe a simple algorithm, and questions about your experience. This is where JavaScript closure questions frequently appear.
Take-Home Assignment (2-4 hours)
Not all companies do this, but it's increasingly common. You'll build a small application or component. They're evaluating code quality, attention to detail, and whether you follow instructions. Don't over-engineer it, but don't submit sloppy code either.
On-Site/Virtual Loop (3-5 hours)
Multiple interviews covering different areas: coding, system design, behavioral questions, and often a "bar raiser" or culture interview. This is the marathon—pace yourself.
Team Fit Interview
Sometimes separate, sometimes part of the loop. You'll meet potential teammates. Be genuine. Ask thoughtful questions about their work.
JavaScript: The Foundation of Everything
Every frontend interview starts with JavaScript. Even if the role is "React Developer" or "Angular Engineer," you'll face fundamental JavaScript questions. Why? Because frameworks come and go, but JavaScript remains. A developer who truly understands JavaScript can learn any framework quickly.
Closures and Scope
If there's one JavaScript concept you must master, it's closures. They appear in almost every interview, and they're foundational to how modern JavaScript works—including React Hooks.
A closure is simply a function that remembers the variables from its outer scope, even after that outer scope has finished executing. That one sentence takes most developers months to truly internalize.
function createCounter() {
let count = 0;
return function() {
count += 1;
return count;
};
}
const counter = createCounter();
console.log(counter()); // 1
console.log(counter()); // 2The inner function "closes over" the count variable. Even though createCounter has finished executing, the returned function still has access to count.
Interviewers love closure questions because they reveal deep understanding. Can you explain why this matters? Can you identify bugs caused by closure issues? Can you use closures intentionally to solve problems?
Deep dive: JavaScript Closures Interview Guide - Everything you need to know about closures, with common interview questions and detailed explanations.
The Event Loop
"Explain the JavaScript event loop" is practically a guaranteed interview question. And most candidates give a mediocre answer because they've memorized an explanation without truly understanding it.
Here's what matters: JavaScript is single-threaded, but it handles asynchronous operations through an event loop that manages a call stack, task queues, and microtask queues. The order of execution isn't always intuitive.
console.log('1');
setTimeout(() => console.log('2'), 0);
Promise.resolve().then(() => console.log('3'));
console.log('4');
// Output: 1, 4, 3, 2If you can't explain why 3 prints before 2 (microtasks vs macrotasks), you'll struggle in interviews. The event loop affects everything from React's batched updates to how you handle API responses.
Deep dive: JavaScript Event Loop Interview Guide - Comprehensive coverage of async JavaScript, including visual explanations and tricky interview scenarios.
Tricky JavaScript Questions
Every interviewer has their favorite "gotcha" questions. These aren't meant to trick you—they test whether you understand JavaScript's quirks and edge cases.
console.log(typeof null); // "object" - historical bug
console.log(0.1 + 0.2 === 0.3); // false - floating point
console.log([] == ![]); // true - type coercion madnessYou don't need to memorize every quirk, but you should understand type coercion, the difference between == and ===, and how this binding works in different contexts.
Deep dive: JavaScript Tricky Questions Interview Guide - The most common gotcha questions with clear explanations of why JavaScript behaves the way it does.
TypeScript: No Longer Optional
In 2026, TypeScript isn't a nice-to-have—it's expected. Most production frontend codebases use TypeScript, and interviewers want to see that you can work with types effectively.
Types vs Interfaces
One of the most common TypeScript interview questions: "When do you use type vs interface?"
The short answer: use interface for object shapes that might be extended, use type for unions, intersections, and complex type transformations. But the real answer is more nuanced.
// Interface - extendable, great for objects
interface User {
id: number;
name: string;
}
interface Admin extends User {
permissions: string[];
}
// Type - more flexible, better for complex types
type Status = 'pending' | 'active' | 'disabled';
type ApiResponse<T> = { data: T; error: null } | { data: null; error: string };What interviewers really want to know: do you understand both options well enough to make informed decisions? Can you explain your choice?
Deep dive: TypeScript Type vs Interface Interview Guide - When to use each, with real-world examples and common interview scenarios.
Generics
If you want to stand out in TypeScript interviews, master generics. Most candidates have surface-level knowledge; few can write complex generic types from scratch.
// Basic generic
function identity<T>(arg: T): T {
return arg;
}
// More advanced: constrained generic with keyof
function getProperty<T, K extends keyof T>(obj: T, key: K): T[K] {
return obj[key];
}
// Real-world: typed API wrapper
async function fetchData<T>(url: string): Promise<T> {
const response = await fetch(url);
return response.json();
}Understanding generics shows you can write reusable, type-safe code—exactly what teams need for maintainable applications.
Deep dive: TypeScript Generics Interview Guide - From basic concepts to advanced patterns like conditional types and mapped types.
TypeScript Gotchas
TypeScript has its own set of tricky questions, usually involving type narrowing, structural typing, or the any vs unknown distinction.
// Why doesn't this work?
function processValue(value: string | number) {
return value.toUpperCase(); // Error!
}
// You need type narrowing
function processValue(value: string | number) {
if (typeof value === 'string') {
return value.toUpperCase(); // Now TypeScript knows it's a string
}
return value.toFixed(2);
}Deep dive: TypeScript Tricky Questions Interview Guide - The questions that separate TypeScript beginners from professionals.
React: The Most In-Demand Framework
React remains the most popular frontend framework, and React interviews have their own patterns. Companies want developers who understand React's mental model, not just its API.
Hooks Deep Dive
If you're interviewing for a React position, you'll face hooks questions. The basics (useState, useEffect) are expected knowledge. What sets candidates apart is understanding when to use each hook and common pitfalls.
// Common mistake: missing dependency
useEffect(() => {
fetchUser(userId); // userId should be in dependency array
}, []); // This only runs once, even if userId changes
// Correct
useEffect(() => {
fetchUser(userId);
}, [userId]); // Runs when userId changesInterviewers often ask about the rules of hooks, custom hooks, and performance optimization with useMemo and useCallback. But here's what they're really testing: do you understand why these hooks exist? Can you identify when they're unnecessary?
Deep dive: React Hooks Interview Guide - Comprehensive coverage of all hooks with practical examples and common interview questions.
Advanced React Patterns
Senior React positions go beyond hooks into architecture questions. How do you handle complex state? When do you reach for Context vs external state management? How do you structure large applications?
// Compound components pattern
<Select value={selected} onChange={setSelected}>
<Select.Option value="a">Option A</Select.Option>
<Select.Option value="b">Option B</Select.Option>
</Select>
// Render props pattern
<DataFetcher url="/api/users">
{({ data, loading, error }) => (
loading ? <Spinner /> : <UserList users={data} />
)}
</DataFetcher>Understanding these patterns shows architectural thinking—exactly what companies need for senior roles.
Deep dive: React Advanced Interview Guide - Patterns, performance optimization, and architecture questions for senior roles.
React 19 Features
Staying current matters. React 19 introduced significant changes, and interviewers may ask about them to gauge whether you keep up with the ecosystem.
Key React 19 features to know:
- React Compiler (automatic memoization)
- Actions and form handling
usehook for promises and context- Document metadata support
- Improved error handling
Deep dive: React 19 Interview Guide - Everything new in React 19 and how to discuss it in interviews.
Redux and State Management
Not every React app uses Redux, but state management questions are common. Even if the company uses something else (Zustand, Jotai, MobX), Redux knowledge demonstrates you understand the flux pattern and immutable state concepts.
// Understanding the Redux flow
const reducer = (state, action) => {
switch (action.type) {
case 'INCREMENT':
return { ...state, count: state.count + 1 };
default:
return state;
}
};Deep dive: Redux Interview Guide - From basic concepts to advanced patterns like middleware and Redux Toolkit.
Angular: The Enterprise Choice
Angular dominates in enterprise environments—banks, insurance companies, large corporations. If you're targeting these employers, Angular knowledge is essential. Angular interviews tend to be more structured, often testing specific framework knowledge.
Change Detection
Angular's change detection is a favorite interview topic because it reveals whether you understand how Angular actually works under the hood.
@Component({
selector: 'app-user',
changeDetection: ChangeDetectionStrategy.OnPush, // Only check on input changes
template: `<div>{{ user.name }}</div>`
})
export class UserComponent {
@Input() user: User;
}Understanding when and why Angular re-renders components is crucial for building performant applications. Interviewers want to see you can optimize real applications, not just recite documentation.
Deep dive: Angular Change Detection Interview Guide - How change detection works, optimization strategies, and common interview questions.
RxJS and Reactive Programming
Angular and RxJS are inseparable. If you're interviewing for Angular positions, you need solid RxJS knowledge—operators, subjects, subscription management, and common patterns.
// Common pattern: search with debounce
this.searchInput.valueChanges.pipe(
debounceTime(300),
distinctUntilChanged(),
switchMap(term => this.searchService.search(term))
).subscribe(results => this.results = results);Many candidates know basic operators but struggle with error handling, higher-order observables, and memory leak prevention. These are exactly the topics interviewers probe.
Deep dive: Angular RxJS Interview Guide - From fundamentals to advanced patterns, with real-world examples.
Angular 21 and Modern Angular
Angular has evolved significantly. Modern Angular emphasizes standalone components, signals for reactivity, and improved developer experience. Knowing these features shows you're current.
// Standalone component (no NgModule needed)
@Component({
standalone: true,
imports: [CommonModule],
template: `<div>{{ count() }}</div>`
})
export class CounterComponent {
count = signal(0); // Signals for fine-grained reactivity
increment() {
this.count.update(c => c + 1);
}
}Deep dive: Angular 21 Interview Guide - New features, migration strategies, and what interviewers ask about modern Angular.
Common Angular Mistakes
I've seen candidates lose offers by making preventable mistakes—both in interviews and in take-home assignments. Knowing what not to do is as important as knowing what to do.
Deep dive: Top 5 Angular Interview Mistakes - The mistakes that cost candidates offers, and how to avoid them.
Angular Advanced Topics
Senior Angular positions probe deeper: dependency injection internals, custom decorators, library development, and performance optimization.
Deep dive: Angular Advanced Interview Guide - Topics for senior and lead Angular developer interviews.
Vue.js: The Progressive Framework
Vue has carved out a strong niche, particularly in startups and mid-size companies. If you're targeting Vue positions, you need to understand both the Options API and the modern Composition API.
Composition API vs Options API
The Composition API (Vue 3) represents a fundamental shift in how Vue applications are structured. Interviewers want to see you understand both approaches and can articulate when each is appropriate.
// Options API - familiar, good for simple components
export default {
data() {
return { count: 0 };
},
methods: {
increment() {
this.count++;
}
}
}
// Composition API - better for complex logic, reusability
import { ref } from 'vue';
export default {
setup() {
const count = ref(0);
const increment = () => count.value++;
return { count, increment };
}
}Vue Reactivity
Vue's reactivity system is elegant but has nuances. Understanding how Vue tracks dependencies and triggers updates is essential for debugging and optimization.
import { ref, reactive, computed } from 'vue';
const count = ref(0); // Primitive reactivity
const user = reactive({ // Object reactivity
name: 'John',
age: 30
});
const doubleCount = computed(() => count.value * 2);Deep dive: Vue.js Interview Guide - Comprehensive coverage from fundamentals to advanced topics like Pinia state management and Vue Router.
CSS: More Than Just Making Things Pretty
CSS questions often catch candidates off guard. They prepare extensively for JavaScript but forget that styling is half of frontend development. Modern CSS interviews go beyond basic selectors.
Flexbox and Grid
Layout is fundamental. You should be able to build common layouts (header/sidebar/content, card grids, centered modals) using Flexbox and Grid without looking up documentation.
/* Flexbox: one-dimensional layout */
.navbar {
display: flex;
justify-content: space-between;
align-items: center;
}
/* Grid: two-dimensional layout */
.dashboard {
display: grid;
grid-template-columns: 250px 1fr;
grid-template-rows: auto 1fr auto;
gap: 1rem;
}Interviewers often give you a mockup and ask you to describe your layout approach. Can you identify when Flexbox is appropriate vs Grid? Do you understand the main axis vs cross axis concepts?
Deep dive: CSS Flexbox and Grid Interview Guide - Master both layout systems with visual examples and common interview scenarios.
Accessibility (a11y)
Accessibility isn't optional anymore—it's a legal requirement for many companies and a moral imperative for all. Expect questions about semantic HTML, ARIA attributes, and keyboard navigation.
<!-- Bad: div soup -->
<div class="button" onclick="submit()">Submit</div>
<!-- Good: semantic HTML -->
<button type="submit">Submit</button>
<!-- When you need ARIA -->
<div role="alert" aria-live="polite">
Form submitted successfully
</div>Understanding accessibility shows maturity as a developer. It's not about memorizing ARIA attributes—it's about building inclusive applications.
Deep dive: HTML5 Accessibility Interview Guide - Semantic HTML, ARIA, screen readers, and building inclusive applications.
What Interviewers Actually Look For
After hundreds of interviews, patterns emerge. Here's what separates successful candidates:
They Think Out Loud
The interviewer can't read your mind. Narrate your thought process. "I'm considering two approaches here... The first would be... but I think the second is better because..."
They Ask Questions
Clarifying requirements isn't a weakness—it's a strength. "Should this handle edge case X?" "What's the expected behavior when Y happens?" "Can I assume Z?"
They Admit What They Don't Know
"I haven't used that library, but based on similar tools I've used, I'd expect it works like..." is a far better answer than confidently making things up.
They Handle Hints Gracefully
When an interviewer gives you a hint, take it. Don't defend your original approach out of pride. Adaptability matters.
They're Genuinely Curious
The best candidates ask thoughtful questions about the codebase, the team's challenges, and the technical decisions the company has made. This curiosity signals someone who'll grow and contribute.
Your Preparation Roadmap
Week 1-2: Foundations
- Review JavaScript fundamentals (closures, event loop, promises)
- Brush up on TypeScript (types, generics, utility types)
- Practice explaining concepts out loud
Week 3-4: Framework Deep Dive
- Focus on your primary framework (React, Angular, or Vue)
- Build a small project from scratch
- Review framework-specific patterns and best practices
Week 5-6: CSS and System Design
- Practice Flexbox and Grid layouts
- Review accessibility requirements
- Study component design and state management patterns
Week 7-8: Practice and Polish
- Do mock interviews (with friends or services)
- Review your past projects for talking points
- Prepare questions to ask interviewers
Practice Questions
Test yourself on these fundamental questions. If you can't answer them confidently, review the relevant deep-dive articles.
JavaScript:
- Explain closures and give an example of their practical use
- What's the difference between the call stack and the task queue?
- How does
thisbinding work in arrow functions vs regular functions?
TypeScript:
4. When would you use unknown instead of any?
5. Write a generic function that works with any array type
6. Explain the difference between type and interface
React:
7. What are the rules of hooks?
8. When would you use useCallback vs useMemo?
9. How do you prevent unnecessary re-renders?
Angular:
10. Explain OnPush change detection strategy
11. What's the difference between Subject and BehaviorSubject?
12. How do you prevent memory leaks with RxJS subscriptions?
CSS: 13. When would you use Flexbox vs Grid? 14. Explain CSS specificity with examples 15. How do you create a responsive layout without media queries?
Quick Reference
| Topic | Key Concepts | Study Resource |
|---|---|---|
| JavaScript Closures | Scope chain, lexical environment, practical uses | Closures Guide |
| Event Loop | Call stack, task queue, microtasks | Event Loop Guide |
| TypeScript Basics | Types, interfaces, type narrowing | Type vs Interface |
| TypeScript Advanced | Generics, utility types, conditional types | Generics Guide |
| React Hooks | useState, useEffect, custom hooks | Hooks Guide |
| React Advanced | Patterns, performance, architecture | Advanced React |
| Angular Core | Change detection, DI, modules | Change Detection |
| Angular RxJS | Operators, subjects, error handling | RxJS Guide |
| Vue.js | Composition API, reactivity, Pinia | Vue Guide |
| CSS Layout | Flexbox, Grid, positioning | CSS Layout Guide |
| Accessibility | Semantic HTML, ARIA, keyboard nav | Accessibility Guide |
Next Steps
You've got the roadmap. Now it's time to put in the work.
Start with the fundamentals—JavaScript closures and the event loop. These concepts appear in almost every interview, and deep understanding here pays dividends across all frameworks.
Then dive into your primary framework. Don't try to learn React, Angular, and Vue simultaneously. Pick one, master it, and learn the others when needed.
Most importantly, practice explaining concepts out loud. The best technical knowledge in the world won't help if you can't communicate it clearly under pressure.
Ready to accelerate your preparation? Our Frontend Interview Questions flashcards cover the 500+ most common questions with detailed explanations—perfect for daily practice sessions during your commute or coffee breaks.
Written by the EasyInterview team — engineers who've conducted 1000+ technical interviews at companies ranging from startups to FAANG.
