Learning path · 29 lessons · 3 topics
🟨 JavaScript & TypeScript interview preparation
The language every frontend interview starts with, plus hands-on machine coding.
Whatever framework you use, frontend interviews start with JavaScript fundamentals: closures, the event loop, this, prototypes and async code. TypeScript is now expected in most teams.
Study JavaScript first, then TypeScript, then the machine-coding problems (debounce, Promise.all, deep clone, an autocomplete component) that test whether you can write it under pressure.
What you will learn
- Scope, closures, this, prototypes and modules
- Event loop, promises and async/await
- TypeScript types, generics, narrowing and utility types
- Polyfills and machine-coding problems
Topics
Roadmap: beginner to advanced
-
1
Beginner Beginner stage
Foundations: the concepts every interviewer expects you to explain clearly.
JavaScript
- What is the difference between var, let and const?
- What is a closure? Give a practical use.
- What is the difference between == and ===? What are truthy and falsy values?
- What is event delegation and how do bubbling and capturing work?
TypeScript
- What is TypeScript and why do teams use it for frontend code?
- interface vs type alias: when do you use each?
Frontend Coding
-
2
Intermediate Intermediate stage
Working knowledge: how things behave in real projects and the trade-offs you make.
JavaScript
- Explain the event loop, the call stack, microtasks and macrotasks.
- How does `this` work in JavaScript?
- Explain prototypes and prototypal inheritance. How do ES6 classes relate?
- Promises vs async/await. How do you handle errors and run work in parallel?
- Explain shallow copy vs deep copy. How do you clone an object correctly?
- What are ES modules? Compare them with CommonJS, and explain tree shaking.
TypeScript
- Explain union types, narrowing and discriminated unions.
- How do generics work? Show a generic function, a constraint and a generic React component.
- Which built-in utility types do you use most?
- How do you type React components, hooks and events in TypeScript?
Frontend Coding
- Implement debounce and throttle. When do you use each?
- Implement Promise.all, Promise.allSettled and Promise.any from scratch.
- Implement deep clone and deep equal, handling Dates, Maps, Sets and circular references.
- Implement curry, compose and pipe.
- Flatten a nested array to a given depth and flatten a nested object into dot paths.
- Implement memoize and an LRU cache.
-
3
Advanced Advanced stage
Senior depth: internals, scale, failure modes and design decisions.
JavaScript
- What are generators and iterators? Where are they used?
- How does garbage collection work in JavaScript and what causes memory leaks in web apps?
TypeScript
Frontend Coding