Frontend interview practice
Frontend Interview Questions & Coding Practice
Practice 685 real-world questions covering JavaScript, algorithms, React, and UI components. Find a challenge by skill and difficulty, or follow a guided preparation plan for your next frontend interview.
Frontend interview practice questions
- JavaScriptCoding exercise
Text Search
EASYImplement a function that wraps occurrences of a search term within a string in highlight markup.
15 minAnthropic · Google · Meta +1Practice - JavaScriptCoding exercise
times
EASYImplement times — invoke a function n times and collect the results into an array.
15 minPractice - JavaScriptCoding exercise
Unique Array
EASYImplement a function that returns a new array with duplicate values removed while preserving original order.
15 minPractice - JavaScriptCoding exercise
without
EASYImplement without — return a copy of an array with the given values excluded, matched by SameValueZero.
15 minPractice - JavaScriptCoding exercise
Array XOR (Symmetric Difference)
EASYImplement lodash xor — return the values that appear in exactly one of the given arrays, with duplicates removed.
20 minPractice - AlgorithmsCoding exercise
Move Zeroes
EASYMove all zeroes to the end of an array in place while keeping the non-zero elements in their original order.
20 minGoogle · MetaPractice - JavaScriptCoding exercise
Cancellable Interval
EASYImplement a setInterval wrapper that returns a function which stops the interval when invoked.
15 minCoinbasePractice - JavaScriptCoding exercise
Cancellable Timeout
EASYImplement a setTimeout wrapper that returns a function you can call to cancel the pending callback.
15 minPractice - JavaScriptCoding exercise
Compose
EASYImplement a function that composes functions right-to-left so the output of each feeds into the next.
15 minPractice - JavaScriptCoding exercise
Cycle
EASYImplement a function that, given several values, returns a function that yields each one in turn and loops forever.
15 minUberPractice - JavaScriptCoding exercise
Debounce
EASYImplement a function that delays invoking another function until a specified period of inactivity has passed.
15 minAdobe · Airbnb · Amazon +26Practice - JavaScriptCoding exercise
Make Counter
EASYImplement a factory that takes a starting integer and returns a function that returns the next value on each call.
15 minAmazon · Robinhood · RobloxPractice - JavaScriptCoding exercise
Number of Arguments
EASYImplement a function that returns the count of arguments passed to it at call time.
15 minPractice - JavaScriptCoding exercise
Once
EASYImplement a function that wraps a callback so it runs at most one time and reuses that result thereafter.
15 minAmazonPractice - JavaScriptCoding exercise
Promise Waterfall
EASYRun async tasks in sequence, feeding each result into the next, stopping the chain on the first rejection.
15 minPractice - JavaScriptCoding exercise
Sleep
EASYImplement a function that returns a promise resolving after the specified number of milliseconds.
15 minAmazon · LinkedIn · NetflixPractice - JavaScriptCoding exercise
Sliding TTL Cache
EASYImplement a cache whose entries expire a fixed time after their last access, not after being set.
15 minPractice - JavaScriptCoding exercise
Typewriter Pacer
EASYBuffer bursty streamed text and emit it one character at a time at a steady cadence, with flush and stop controls.
18 minPractice - JavaScriptCoding exercise
Throttle
MEDIUMImplement a function that limits how often a wrapped function can be invoked within a time window.
15 minAdobe · Amazon · Atlassian +20Practice - JavaScriptCoding exercise
Array.prototype.myReduce
MEDIUMImplement Array.prototype.myReduce — the reduce method from scratch, including the empty-array + initial-value edge cases.
20 minAmazon · Google · Meta +1Practice - JavaScriptCoding exercise
Analytics Event SDK
MEDIUMBuild an analytics client that queues tracked events, flushes them in batches, and retries failed sends with backoff.
25 minPremium questionPractice - JavaScriptCoding exercise
Async Debounce (Latest Wins)
MEDIUMImplement an async debounce that resolves only the newest call and discards the results of superseded ones.
25 minPractice - JavaScriptCoding exercise
Async Memoize with TTL
MEDIUMImplement an async memoize that caches results by key for a TTL and coalesces concurrent calls for the same key.
25 minPractice - JavaScriptCoding exercise
Batch Event Flusher
MEDIUMBuffer events and flush them in batches when a size threshold or a max-wait timer is reached.
25 minPremium questionPractice - JavaScriptCoding exercise
before / after
MEDIUMImplement before and after — cap how many times a function runs, or delay invoking it until the Nth call.
25 minPremium questionPractice - JavaScriptCoding exercise
Class Variance Authority
MEDIUMImplement a simplified cva that builds class names from base styles, variant tables, and default values.
25 minPractice - JavaScriptCoding exercise
Console Log History
MEDIUMImplement a wrapper that intercepts console.log calls and records their arguments for later inspection.
25 minMetaPractice - JavaScriptCoding exercise
Curry
MEDIUMImplement a function that transforms a multi-argument function into a chain of single-argument calls.
25 minAmazon · Intuit · Meta +2Practice - JavaScriptCoding exercise
Curry II
MEDIUMImplement a flexible curry where each call can supply any number of arguments until the original arity is reached.
25 minPremium questionQualcommPractice - JavaScriptCoding exercise
Debounce II
MEDIUMExtend debounce with cancel and flush methods to abort or immediately invoke pending calls.
25 minAirbnb · Flipkart · Google +6Practice - JavaScriptCoding exercise
Debounce III
MEDIUMExtend debounce with a maxWait option that forces a call after a maximum delay even under constant activity.
25 minPremium questionPractice - JavaScriptCoding exercise
Dependency Injection Container
MEDIUMBuild a DI container that resolves a service dependency graph, caches singletons, and detects circular dependencies.
25 minGoogle · Microsoft · UberPractice - AlgorithmsCoding exercise
Distinct Paths in Grid
MEDIUMImplement a function that counts the number of unique paths a robot can take from the top-left to bottom-right of an m by n grid.
25 minPractice - JavaScriptCoding exercise
flow
MEDIUMImplement flow — compose functions left to right so each output feeds the next.
25 minPremium questionPractice - JavaScriptCoding exercise
Function.prototype.bind
MEDIUMImplement Function.prototype.myBind — return a new function with a fixed `this` and optional preset arguments.
25 minAdobe · Amazon · Atlassian +3Practice - JavaScriptCoding exercise
HTTP Client Interceptors
MEDIUMBuild an axios-style client whose request and response interceptors transform each call as it passes through the chain.
25 minPremium questionPractice - JavaScriptCoding exercise
Limit
MEDIUMImplement a function that wraps a callback so it runs at most N times and returns the last result thereafter.
25 minPremium questionPractice - JavaScriptCoding exercise
Make Counter II
MEDIUMImplement a factory that returns a counter object with methods to read, increment, decrement, and reset its value.
25 minPremium questionAmazonPractice - JavaScriptCoding exercise
Memoize
MEDIUMImplement a function that caches results of a single-argument function so repeat calls return instantly.
25 minAirbnb · Atlassian · Expedia +5Practice - JavaScriptCoding exercise
Memoize II
MEDIUMImplement a memoize helper that caches results for functions called with any number and type of arguments.
25 minAirbnb · Expedia · LinkedIn +3Practice