Okay, here is an extremely extended, comprehensive, and detailed list of JavaScript topics and subtopics for a Frontend SDE interview. The goal is to be exhaustive, covering everything from the absolute basics to advanced concepts, build tools, testing, performance, and ecosystem knowledge relevant to a frontend role.
This list is intentionally long and granular to cover as much ground as possible, reflecting the "don't miss anything" and "make list as big as possible" requirements.
Extended JavaScript Interview Topics & Subtopics for Frontend SDE Role
This list covers core JavaScript language features, browser APIs, asynchronous programming, modern ES features, tooling, performance, testing, and related concepts essential for a Frontend Software Development Engineer.
I. Core JavaScript Language Fundamentals
-
JavaScript Basics & History
- What is JavaScript? Its purpose and role in web development.
- Difference between JavaScript, ECMAScript, and V8/SpiderMonkey/etc.
- Brief history of JavaScript (Brendan Eich, Netscape, standardization).
- Key ECMAScript versions (ES5, ES6/ES2015, ES Next) and their significance.
- Execution environments (Browser vs. Node.js - focus on Browser).
-
Syntax, Variables, and Data Types
- Basic syntax rules, statements, expressions.
- Strict Mode (
'use strict').
- Variables:
var, let, const. Differences, hoisting, scope (function vs. block).
- Primitive Data Types:
String: literals, template literals, escape characters, common methods (slice, split, join, indexOf, replace, toUpperCase, toLowerCase, etc.).
Number: integers, floats, Infinity, -Infinity, NaN. parseInt, parseFloat, isNaN, Number.isFinite, Number.isNaN.
BigInt: Purpose and usage.
Boolean: true, false. Truthy and Falsy values.
Null: Meaning and typeof null.
Undefined: Meaning, how variables become undefined, typeof undefined.
Symbol: Purpose, creating unique identifiers.
- Reference Data Types:
Object: creating objects (literals, constructor, Object.create), properties, methods.
typeof operator.
- Type Coercion and Conversions (explicit vs. implicit).
- Operators:
- Arithmetic (
+, -, *, /, %, **).
- Assignment (
=, +=, -=, etc.).
- Comparison (
==, !=, ===, !==, >, <, >=, <=). Deep dive into == vs ===.
- Logical (
&&, ||, !, ?? - Nullish coalescing, ?. - Optional chaining).
- Bitwise operators.
- Unary operators (
+, -, !, ~, typeof, void, delete).
- Ternary operator (
? :).
- Comma operator.
-
Control Flow
if, else if, else.
switch.
- Loops:
for, while, do...while.
- Looping through collections:
for...in, for...of.
- Breaking and continuing loops (
break, continue).
- Error Handling:
try...catch...finally, throw keyword, Error object and its properties (message, stack, name). Custom error types.
-
Functions
- Function Declarations vs. Function Expressions.
- Arrow Functions (
=>): syntax, this binding differences, no arguments object, not suitable as constructors.
- Anonymous Functions.
- Immediately Invoked Function Expressions (IIFEs).
- Function parameters: default parameters, rest parameters (
...).
arguments object (and why rest parameters are preferred).
- Return values.
- Recursion.
- Higher-Order Functions (functions that take functions as arguments or return functions).
- Callbacks.
call, apply, bind methods: how they change this, use cases.
- Pure Functions: definition and importance (testability, predictability).
- Side Effects: understanding and managing.
-
Scope and Closures
- Execution Context (Global Execution Context, Function Execution Context).
- Creation Phase vs. Execution Phase.
- Lexical Scoping: how scope is determined.
- Scope Chain.
- Variable Hoisting (for
var, function declarations).
- Temporal Dead Zone (for
let, const).
- Closures: definition, how they work (accessing outer scope variables), common examples (factories, private variables, event handlers), potential pitfalls (memory leaks).
-
Objects and Prototypes
- Objects: Properties (accessing with
., []), methods.
- Property attributes:
writable, enumerable, configurable. Object.defineProperty, Object.defineProperties.
- Getters and Setters.
this keyword: Understanding its dynamic binding based on how a function is called (global, method, constructor, explicit bind using call/apply/bind, arrow functions).
- Constructors: using
new keyword.
- Prototypal Inheritance:
__proto__ property (internal link).
prototype property (on constructor functions).
- Prototype Chain: how properties and methods are looked up.
Object.getPrototypeOf().
instanceof operator.
hasOwnProperty() vs checking prototype chain.
class syntax (ES6): syntax sugar over prototypes, constructors, extends, super, static methods, public/private class fields (new syntax).
- Object methods:
Object.keys(), Object.values(), Object.entries(), Object.assign(), Object.create(), Object.freeze(), Object.seal(), Object.preventExtensions().
-
Arrays and Iterables
- Array literals, creating arrays.
- Array properties (
length).
- Array methods:
- Mutator methods (
push, pop, shift, unshift, splice, sort, reverse, fill, copyWithin).
- Accessor methods (
slice, concat, indexOf, lastIndexOf, includes, join, toString, toLocaleString).
- Iteration methods (
forEach, map, filter, reduce, reduceRight, every, some, find, findIndex, flatMap, flat). Deep understanding of map, filter, reduce.
- Array-like objects (e.g.,
arguments, NodeList) and how to convert them to arrays (Array.from(), spread syntax [...]).
- Iteration Protocols:
Iterable and Iterator. How for...of works. Custom iterators.
- Destructuring Arrays.
- Spread syntax (
...) with arrays (copying, concatenating).
-
Other Built-in Objects
Date: creating dates, methods (getFullYear, getMonth, getDate, getHours, getMinutes, getSeconds, getMilliseconds, getTime), Date.parse, Date.now.
Math: properties (PI, E), methods (abs, ceil, floor, round, random, max, min, pow, sqrt, sin, cos, tan, etc.).
RegExp (Regular Expressions): creating regex, methods (test, exec, match, search, replace), flags (g, i, m, u, y), character classes, quantifiers, groups, lookarounds.
Map: creating, methods (set, get, has, delete, clear, size), iteration. Differences from plain Objects.
Set: creating, methods (add, delete, has, clear, size), iteration.
WeakMap and WeakSet: differences from Map/Set, use cases (memory management).
JSON: JSON.parse(), JSON.stringify(). Handling circular references.
-
Asynchronous JavaScript
- Concurrency Model: Single-threaded nature of JS.
- The Event Loop: Call Stack, Heap, Web APIs (DOM, Timers, HTTP Requests), Callback Queue (Task Queue), Microtask Queue. How it processes async operations.
setTimeout and setInterval: how they work in the event loop, potential issues with setInterval. requestAnimationFrame.
- Callbacks: Callback hell, disadvantages.
- Promises:
- What they are (pending, fulfilled, rejected states).
- Creating Promises (
new Promise((resolve, reject) => ...)).
- Consuming Promises (
.then(), .catch(), .finally()).
- Chaining Promises.
Promise.resolve(), Promise.reject().
Promise.all(), Promise.race(), Promise.allSettled(), Promise.any().
async/await:
- Syntax and how it simplifies Promise usage.
- Error handling with
try...catch.
- Awaiting multiple promises (sequential vs. parallel).
- Top-level await.
- Microtasks vs. Macrotasks (Tasks): Order of execution (Promises/Async/Await/queueMicrotask vs. Timers/I/O/UI rendering).
-
Modules
- Why modules are needed (organization, preventing global pollution, dependency management).
- CommonJS (Node.js standard,
require/module.exports) - relevant if discussing build tools.
- AMD (RequireJS) - historical context.
- ES Modules (ESM):
import/export syntax (named, default).
- Static vs. dynamic imports (
import()).
- Circular dependencies.
- Integration with build tools.
- Browser support for native ESM (
<script type="module">).
-
Memory Management and Garbage Collection
- How JavaScript handles memory (allocation, usage, release).
- Garbage Collection: Mark-and-sweep algorithm (conceptual understanding).
- Identifying and preventing memory leaks (e.g., detached DOM nodes, closures holding references, forgotten timers, global variables).
- Browser DevTools Memory tab.
-
ES6+ Features (Specific Deep Dive)
let and const (block scoping, TDZ).
- Arrow functions (
this binding).
- Template Literals (multiline strings, interpolation).
- Destructuring (Object and Array).
- Spread and Rest operators.
- Default Parameters.
- Classes.
- Modules (
import/export).
- Promises.
async/await.
for...of loop.
Map and Set.
Symbol.
- Generators (
function*, yield).
- Iterators (Iterable protocol).
Proxy and Reflect (advanced metaprogramming).
- Nullish coalescing (
??).
- Optional chaining (
?.).
BigInt.
- Dynamic
import().
Promise.allSettled, Promise.any.
- Private class fields (
#).
queueMicrotask().
II. JavaScript in the Browser Environment (Web APIs)
-
Document Object Model (DOM)
- What is the DOM? Tree structure.
- Accessing elements:
getElementById, getElementsByClassName, getElementsByTagName, querySelector, querySelectorAll, closest.
- Traversing the DOM:
parentNode, childNodes, firstChild, lastChild, nextSibling, previousSibling, children, firstElementChild, lastElementChild, nextElementSibling, previousElementSibling.
- Manipulating elements:
- Creating nodes:
createElement, createTextNode, createDocumentFragment.
- Adding nodes:
appendChild, insertBefore, replaceChild, insertAdjacentElement, insertAdjacentHTML, prepend, append, before, after.
- Removing nodes:
removeChild, remove.
- Modifying content:
textContent, innerHTML, outerHTML. Risks of innerHTML (XSS).
- Modifying attributes:
getAttribute, setAttribute, removeAttribute, hasAttribute, classList (add, remove, toggle, contains), className, id, style (inline styles).
- Understanding Reflow (Layout) and Repaint (Paint): how DOM manipulations trigger them, strategies to minimize them (e.g., using DocumentFragment, reading then writing styles, batching DOM updates).
- Virtual DOM (concept, relevant when discussing frameworks like React/Vue).
- Shadow DOM (part of Web Components).
-
Browser Object Model (BOM)
window object: global scope in the browser, key properties and methods.
navigator object: browser information, user agent.
screen object: screen dimensions.
location object: current URL, navigation (, , ).
III. Modern Frontend Development Ecosystem & Tooling
-
Package Managers
npm (Node Package Manager): package.json file (dependencies, devDependencies, peerDependencies, scripts, versioning - semver), npm install, npm update, npm ci, npm link, npm scripts.
yarn: History, differences from npm (lock files, performance).
pnpm: Differences from npm/yarn (content-addressable store).
- Lock files (
package-lock.json, yarn.lock, pnpm-lock.yaml): Purpose and importance.
-
Module Bundlers
- Why they are needed (handling dependencies, bundling, transpiling, optimizations).
- Webpack:
- Core concepts: Entry, Output, Loaders, Plugins, Mode (development, production).
- Configuration file (
webpack.config.js).
- Loaders (e.g.,
babel-loader, css-loader, style-loader, file-loader, asset modules).
- Plugins (e.g.,
HtmlWebpackPlugin, CleanWebpackPlugin, DefinePlugin, MiniCssExtractPlugin, TerserPlugin).
- Dev Server (
webpack-dev-server).
- Hot Module Replacement (HMR).
- Code Splitting (
import(), SplitChunksPlugin).
- Tree Shaking.
- Parcel: Zero-configuration bundler, advantages/disadvantages.
- Rollup: Optimized for libraries, advantages/disadvantages, tree shaking.
- Vite: Development server based on native ESM, build with Rollup, speed advantages.
-
Transpilers
- Why needed (ES6+ features, TypeScript, JSX).
- Babel:
- How it works (parsing, transforming, generating).
- Configuration (
.babelrc, babel.config.js).
- Presets (
@babel/preset-env, @babel/preset-react, @babel/preset-typescript).
- Plugins.
- Polyfills (
@babel/polyfill, core-js, @babel/plugin-transform-runtime).
-
Linters and Formatters
IV. Performance and Optimization
-
General Web Performance Concepts
- Page Load Time.
- Runtime Performance (Responsiveness).
- Rendering Performance.
- Network Latency.
- Measuring performance (Browser DevTools Performance/Network/Memory tabs, Lighthouse, WebPageTest, PageSpeed Insights, Core Web Vitals).
-
JavaScript Loading and Execution Optimization
- Async and Defer attributes for
<script> tags: differences and use cases.
- Code Splitting (Webpack, Vite).
- Lazy Loading (components, routes, assets).
- Tree Shaking (removing unused code).
- Minification and Uglification.
- Compression (Gzip, Brotli).
- Caching (Browser Cache, Service Workers Cache, CDN).
- Resource Hints (
preload, prefetch, preconnect, dns-prefetch).
- Critical CSS and render-blocking resources.
-
JavaScript Runtime Performance Optimization
- Efficient DOM manipulation (batching updates, DocumentFragment).
- Avoiding layout thrashing.
- Using
requestAnimationFrame for animations.
- Optimizing loops and algorithms.
- Avoiding unnecessary re-renders (especially in frameworks).
- Debouncing and Throttling event handlers.
- Web Workers for heavy computation.
- Memory leak detection and fixing.
- Profiling JS execution (Browser DevTools Performance tab).
-
Rendering Performance
- Understanding the rendering pipeline (DOM, CSSOM, Render Tree, Layout, Paint, Composite).
- Minimizing Reflow and Repaint.
- CSS Triggers (understanding which CSS properties cause layout, paint, or composite).
- Using hardware acceleration (CSS
transform, opacity).
V. Testing
-
Testing Fundamentals
- Why testing is important (quality, maintainability, confidence).
- Types of testing: Unit, Integration, End-to-End (E2E).
- Test Pyramid.
- Test Driven Development (TDD) vs. Behavior Driven Development (BDD).
-
JavaScript Testing Frameworks & Tools
- Jest: Popular framework, zero config for many JS projects, assertion library, mocking, test runners.
- Mocha: Test runner.
- Chai: Assertion library (
expect, should, assert).
- Sinon.js: Spies, stubs, mocks.
- Testing Library (
@testing-library/dom, @testing-library/react, etc.): Focus on user interactions and accessibility, querying the DOM.
- Enzyme (less common now, React specific): DOM rendering and traversal utilities.
- Cypress / Playwright: E2E testing frameworks.
- JSDOM: Simulating a DOM environment in Node.js for testing.
- Test Coverage reports (Istanbul/nyc).
-
Specific Testing Concepts in JS
- Writing unit tests for functions/modules.
- Testing asynchronous code (Promises, async/await).
- Mocking dependencies (functions, modules, API calls - e.g.,
jest.fn(), jest.mock(), fetch-mock, msw).
- Testing DOM interactions.
- Testing with user events.
- Writing integration tests.
- Setting up testing environment (Jest config, Babel/Webpack integration).
VI. Security
-
Web Security Basics
- Same-Origin Policy (SOP).
- Cross-Origin Resource Sharing (CORS).
- Content Security Policy (CSP): Headers, directives (
default-src, script-src, style-src, etc.).
- Subresource Integrity (SRI).
-
Common JavaScript Vulnerabilities and Prevention
- Cross-Site Scripting (XSS):
- Types (Stored, Reflected, DOM-based).
- Prevention techniques (Input sanitization, Output encoding, using
textContent instead of innerHTML, CSP, httpOnly cookies).
- Cross-Site Request Forgery (CSRF):
- How it works.
- Prevention techniques (CSRF tokens, SameSite cookies, Origin header validation).
- Insecure Direct Object References (IDOR) - less JS specific, but relevant to API interaction.
- Client-side Storage Security (
localStorage, sessionStorage, Cookies). Do not store sensitive data client-side.
- Evaluation of untrusted code (
eval(), new Function()).
- Protecting against clickjacking.
- Handling sensitive data transmission (HTTPS).
VII. Design Patterns
-
Common JavaScript Design Patterns
- Module Pattern / Revealing Module Pattern (for encapsulation and privacy).
- Factory Pattern.
- Singleton Pattern.
- Observer Pattern / Pub-Sub Pattern (Event emitters).
- Strategy Pattern.
- Adapter Pattern.
- Decorator Pattern (concept, ES proposal).
- Facade Pattern.
- Mixin Pattern.
- Constructor Pattern.
- Prototype Pattern.
- Command Pattern.
- Proxy Pattern.
-
Architectural Patterns (relevant to frontend applications)
- MVC (Model-View-Controller).
- MVP (Model-View-Presenter).
- MVVM (Model-View-ViewModel).
- Component-Based Architecture.
- Flux / Redux / Vuex patterns (unidirectional data flow, central store - even if not using these libraries, understanding the pattern is key).
VIII. Accessibility (A11y)
- JavaScript and Accessibility
- ARIA attributes (
aria-role, aria-state, aria-property).
- Managing focus (
element.focus(), element.blur(), tabindex).
- Keyboard navigation handling.
- Announcing dynamic content changes (ARIA live regions).
- Making custom controls accessible.
- Testing accessibility with tools (Axe, Lighthouse A11y audits).
IX. Server-Side Rendering (SSR) / Universal JavaScript
-
Concepts
- Why SSR is used (SEO, initial load performance, perceived performance).
- Challenges of SSR (hydration, different environments - browser vs. server).
- Isomorphic / Universal JavaScript.
-
Related Technologies (Mentioning context)
- Node.js environment differences (
window, document are not available by default).
- Frameworks supporting SSR (e.g., Next.js, Nuxt.js, Angular Universal). (Note: Deep dives into specific framework SSR implementation might be separate, but the general concept is JS).
X. TypeScript (Highly Relevant for Modern Frontend)
-
TypeScript Fundamentals
- What is TypeScript? Why use it? (Static typing, tooling, maintainability, catching errors early).
- Compilation (
tsc).
- Basic Types:
number, string, boolean, null, undefined, void, any, unknown, never.
- Arrays and Tuples.
- Enums (numeric, string).
- Objects and Interfaces: defining shapes.
- Type Aliases (
type).
- Union Types (
|), Intersection Types (&).
- Literal Types.
- Functions: type annotations for parameters and return types, function signatures.
- Type Assertion (
as, <>).
- Type Casting.
const assertions.
-
Advanced TypeScript Concepts
- Classes and Interfaces. Implementing interfaces. Access modifiers (
public, private, protected, readonly).
- Generics: Creating reusable components, generic functions, generic interfaces, generic classes, generic constraints.
- Utility Types (
Partial, Required, Readonly, Pick, Omit, Exclude, Extract, NonNullable, Parameters, ReturnType, InstanceType, Awaited).
- Conditional Types.
- Mapped Types.
- Index Signatures.
- Declaration Merging.
this types.
- Decorators (experimental).
-
TypeScript in Practice
tsconfig.json configuration options (e.g., target, module, strict, esModuleInterop, skipLibCheck, outDir, rootDir, paths).
- Integrating TypeScript with build tools (Babel, Webpack, Vite).
- Declaration Files (
.d.ts): Writing and using them, @types/ packages.
XI. Problem Solving and Coding Challenges (JavaScript Implementation)
-
Algorithm and Data Structure Fundamentals
- Implementing basic data structures (Linked Lists, Stacks, Queues, basic Trees/Graphs) in JS.
- Sorting and searching algorithms implementation.
- Recursion vs. Iteration.
- Time and Space Complexity Analysis (Big O notation) for JS code.
- Solving common coding problems (e.g., string manipulation, array manipulation, tree traversals, graph traversals, dynamic programming - basic examples).
-
JavaScript-Specific Coding Problems
- Implementing
bind, call, apply.
- Implementing
debounce or throttle.
- Implementing a Promise polyfill.
- Flattening nested arrays/objects.
- Deep cloning objects.
- Memoization techniques.
- DOM manipulation tasks (e.g., creating a dynamic table, implementing drag-and-drop, infinite scroll).
- Asynchronous coordination problems (e.g., calling APIs in sequence/parallel, rate limiting).
- Event loop related puzzles.
XII. Soft Skills & Behavioral (in a technical context)
-
Technical Communication
- Explaining complex technical concepts clearly.
- Discussing trade-offs between different approaches.
- Whiteboard coding skills.
-
Debugging and Problem Solving Approach
- How you debug JavaScript code (Browser DevTools,
console.log, breakpoints).
- Strategies for isolating bugs.
- How you approach solving a new technical problem.
-
Collaboration and Code Quality
- Code review process (giving and receiving feedback).
- Working in a team (version control - Git workflow, pull requests).
- Writing clean, readable, and maintainable code.
- Refactoring strategies.
-
Learning and Growth
- How you stay updated with the latest JS features and ecosystem trends.
- Experience learning new libraries or frameworks.
- Handling technical challenges you don't immediately know how to solve.
XIII. The Future of JavaScript and the Web
-
TC39 Proposals
- Understanding the TC39 process (stages).
- Awareness of popular Stage 3/4 proposals (e.g., Decorators, Top-level await - if not already GA, Record & Tuple).
-
WebAssembly (Wasm)
- What it is and its purpose.
- How JS interacts with Wasm.
- Use cases for Wasm in the browser.
This list is extremely detailed and covers a vast range of topics. The depth of questioning on each topic will vary depending on the level of the role (Junior, Mid-level, Senior) and the specific focus of the team/company. However, having a foundational understanding of most of these areas, and deeper knowledge in core language features, asynchronous programming, DOM manipulation, modern ES features, build tools, performance, and testing is crucial for a Frontend SDE role. Good luck!