Interview questions hub
Frontend Interview Questions for Quick Prep
Interview-questions hub for fast frontend interview prep: start with the most crucial JavaScript coding and concept prompts, then branch into full technology hubs for broader coverage.
Start here
Start interview prep in 30 seconds
Start with one crucial question first, then move into study plans and deeper prep routes once momentum is established.
Current essentials
- Coding
- 12
- Concepts
- 12
- Must know
- 24
Prep plan at a glance
Use this page as a planning surface for interview prep, not just a random question feed.
- Start with curated JavaScript essentials to warm up interview execution speed.
- Mix coding implementation drills with concept explanation checks in one short loop.
- Expand to framework hubs, guides, and tracks once your baseline is stable.
More routes and deep-dive links
Primary prep routes
Explore public study plans
Explore technology interview-question hubs
Most crucial JavaScript coding interview questions
- Remove Duplicates
Critical for coding rounds and edge-case discussion.
Implement uniqueArray(arr) that removes duplicates while preserving order. Use a Set for O(n) time and clarify how to treat objects by reference, NaN, and mixed types so behavior is explicit and predictable. Concepts: a…
Open challenge → - Shallow Clone (Object or Array)
Critical for coding rounds and edge-case discussion.
Create a shallow copy of an array or object. Copy top-level properties but keep nested references intact, and document that limitation clearly. This clarifies the difference between shallow and deep cloning and helps av…
Open challenge → - Sleep / Delay Promise
Critical for coding rounds and edge-case discussion.
Implement sleep(ms) that returns a Promise resolving after ms milliseconds. Use it to pause async flows like retries, exponential backoff, UI delays, or test helpers without blocking the event loop or freezing the UI th…
Open challenge → - Sort Numbers with Array.prototype.sort
Critical for coding rounds and edge-case discussion.
Implement a function `sortNumbers(arr, ascending = true)` that returns a **new array** of numbers sorted numerically in ascending or descending order. The original array must not be mutated, and you should use `Array.pr…
Open challenge → - Update Array at Index (Immutable)
Critical for coding rounds and edge-case discussion.
Return a new array with one index updated, leaving the original array untouched. This is the core immutable update pattern used in reducers, React state updates, and UI list editing, and it prevents accidental mutation.
Open challenge → - Create a Deferred Promise (For Async Tests)
Critical for coding rounds and edge-case discussion.
Implement createDeferred() to build a controllable Promise: { promise, resolve, reject }. This is a common testing tool to make async flows deterministic (you decide exactly when something resolves/rejects).
Open challenge → - Create a Spy Function (Test Double)
Critical for coding rounds and edge-case discussion.
Implement createSpy(impl?) to produce a callable spy that records every call (args + this) and optionally delegates to an implementation. Spies are a core unit-testing tool to verify behavior at boundaries (network, sto…
Open challenge → - Custom setTimeout/clearTimeout Timer Manager
Critical for coding rounds and edge-case discussion.
Build a timer registry with mySetTimeout, myClearTimeout, and myClearAllTimeouts. Return your own numeric ids, store native handles, and clean up on fire. Complexity: O(1) set/clear, O(k) for clearAll.
Open challenge → - Data Helper 1: Get Value by Path
Critical for coding rounds and edge-case discussion.
Implement `getByPath(obj, path, fallback?)` that safely reads a nested value from an object. This is extremely common in frontend screens (reading deep API responses, feature flags, form state) and shows up often in int…
Open challenge → - Data Helper 2: Set Value by Path
Critical for coding rounds and edge-case discussion.
Implement setByPath(obj, path, value) that returns a new object/array tree with the value written at the nested path. Normalize dot or segment paths, create missing containers based on numeric segments, and never mutate…
Open challenge → - Debounce Function
Critical for coding rounds and edge-case discussion.
Implement debounce(fn, wait) that delays execution until the user stops triggering events. Clear the previous timer on each call, preserve this/args, and make the timing predictable for search/resize use cases.
Open challenge → - Delegated Event Handler (E)
Critical for coding rounds and edge-case discussion.
Implement `delegate(root, eventType, selector, handler)` for **event delegation**. Requirements: 1) Attach **one** event listener to `root`. 2) When an event fires, if `event.target` (or one of its ancestors up to `root…
Open challenge →
Most crucial JavaScript concept questions for interviews
- What are callbacks in JavaScript?
Frequently tested in explanation-heavy rounds.
A callback is a function passed as an argument to another function to be executed later, often after a task is completed. Covers: async, callbacks, event loop, functions, higher order functions.
Open question → - Arrow functions vs regular functions in JavaScript
Frequently tested in explanation-heavy rounds.
Arrow and regular functions look similar but behave differently for this binding, constructors, arguments, and method design. Strong answers explain lexical vs dynamic this, prototype/new behavior, and when each style i…
Open question → - Async Race Conditions and Stale UI Updates
Frequently tested in explanation-heavy rounds.
When multiple async requests are in flight, they can resolve out of order and overwrite newer UI state. Explain why this happens and how to prevent stale updates with cancellation or guards.
Open question → - DOM XSS Prevention in JavaScript: Dangerous Sinks, Safe APIs, and CSP
Frequently tested in explanation-heavy rounds.
Security-focused frontend interview guide to DOM XSS: attacker-controlled sources, dangerous DOM sinks, safe rendering patterns, URL/protocol validation, and defense in depth with CSP and Trusted Types.
Open question → - Explain 'hoisting' in JavaScript
Frequently tested in explanation-heavy rounds.
Hoisting is JavaScript declaration processing before execution. Declarations are known earlier than the line they appear on, but initialization timing differs by construct.
Open question → - Explain Closures in JavaScript
Frequently tested in explanation-heavy rounds.
A closure happens when a function keeps access to variables from its outer scope, even after that outer function has finished. It’s how JavaScript allows private data and persistent state inside functions.
Open question → - Explain Event Delegation in JavaScript
Frequently tested in explanation-heavy rounds.
Event delegation is a technique where a single event listener on a parent element handles events for multiple child elements by using event bubbling and checking the event target. Edge cases include stopPropagation and…
Open question → - Explain Hoisting and the Temporal Dead Zone (TDZ)
Frequently tested in explanation-heavy rounds.
Hoisting means declarations are processed before execution. TDZ means let/const exist but cannot be accessed before their declaration line, which throws ReferenceError.
Open question → - Explain the `this` keyword in JavaScript
Frequently tested in explanation-heavy rounds.
The value of `this` in JavaScript depends on how a function is called — not where it’s defined. It can refer to the global object, a specific object, or be `undefined` in strict mode or arrow functions. The value of thi…
Open question → - Explain the difference in hoisting between `var`, `let`, and `const`
Frequently tested in explanation-heavy rounds.
var, let, and const are all hoisted, but they differ in initialization and access-before-declaration behavior. var initializes to undefined; let/const stay in TDZ until declaration executes.
Open question → - How do you optimize a web page’s response or load time?
Frequently tested in explanation-heavy rounds.
This question checks if you can reason about performance across the network, render pipeline, assets, and runtime. Interviewers expect concrete tactics like caching, compression, code splitting, and image optimization.
Open question → - How does Promise resolve callback hell in JavaScript?
Frequently tested in explanation-heavy rounds.
Callback hell happens when async callbacks are deeply nested and error handling is duplicated. Promises flatten async control flow, centralize failures with catch, and make sequencing and parallel execution easier to re…
Open question →
Complete the prep loop
After these Frontend Interview Questions for Quick Prep drills, continue with frontend interview questions hub, then frontend interview preparation guides and frontend interview study plans to keep your weekly plan structured.