Prep path

Coding Challenge Hub

Frontend Coding Challenges

Build and debug focused frontend prompts across JavaScript functions, UI exercises, HTML/CSS implementation, and debugging tasks.

Real prompts Starter code Tests Solutions + follow-ups Free to start

Selected frontend coding challenges are free to start. Premium unlocks additional question sets and deeper solution context while locked items stay gated.

New to coding interviews?

Five short warm-ups, all free and Easy.

Interview coming up?

The JavaScript utilities interviewers ask for most, starting with Debounce.

Opens the first matching coding challenge from the current view.
184 matches
Debounce Function
Implement debounce(fn, delay) by returning a trailing-edge wrapper that clears the previous timer and runs fn only after…
IntermediateJavaScript Additional metadata: Practice priority: High
Box Model: Margin, Padding, Border
Build a card layout that clearly demonstrates the CSS box model. Use padding to add internal breathing room, a border to…
EasyCSS Additional metadata: Practice priority: High
Semantic Page Layout
Build a semantic page layout using header, nav, main, section, article, and footer. Focus on correct landmarks, heading…
EasyHTML Additional metadata: Practice priority: High
Flexbox: Responsive Navbar
Practice a realistic frontend interview prompt: build a responsive navigation bar with Flexbox, preserve readable links,…
IntermediateCSS Additional metadata: Practice priority: High
Forms & Pseudo-classes: Focus, Invalid, Required, Helper Text
Style form fields using :focus, :invalid, and :required to guide users. Show clear focus rings, error borders, and helpe…
IntermediateCSS Additional metadata: Practice priority: High
Grid: Card Gallery (2→4 Columns)
Practice a realistic frontend interview prompt: create a responsive card gallery with CSS Grid, keep cards readable acro…
IntermediateCSS Additional metadata: Practice priority: High
React Autocomplete Interview Question
Practice a React autocomplete interview question in a live editor. Build a controlled search input with debounce, stale-…
IntermediateReact Additional metadata: Practice priority: High
React Fetch and Render a List with Loading, Error and Empty States
Build a React component that loads a team list from a fake API and renders every request state: loading, success, empty,…
IntermediateReact Additional metadata: Practice priority: High
Tables and Accessibility
The goal is to provide a semantic table that screen readers can navigate, with a clear caption and correct header associ…
IntermediateHTML Additional metadata: Practice priority: High
Theming with CSS Variables: OS Dark Mode + Manual Override
Create a themeable panel using CSS custom properties. Define light defaults on :root, redefine the same tokens for OS da…
IntermediateCSS Additional metadata: Practice priority: High
Contact Form with Proper Labels
The success message should only appear after a valid submit, so native validation must be enabled and the form action sh…
EasyHTML Additional metadata: Practice priority: High
Debugging
Fix missing return in map / filter
A teammate refactored a simple array pipeline to use block-bodied arrow functions because it looked more readable. The s…
EasyJavaScript Additional metadata: Practice priority: High
Debugging
Fix numeric sort in sortScores
A teammate wrote a tiny leaderboard helper with plain sort(). It looked fine in a quick demo with single-digit values, t…
EasyJavaScript Additional metadata: Practice priority: High
Debugging
Fix off-by-one in chunk
A teammate wrote chunk(arr, size) to split rows into smaller batches. It looks fine at first glance, but the loop bounda…
EasyJavaScript Additional metadata: Practice priority: High
Debugging
Fix wrong defaults in normalizeSettings
A teammate used || while hydrating UI settings, and the bug stayed invisible until real saved values showed up. Now 0, a…
EasyJavaScript Additional metadata: Practice priority: High
Links and Images
Create semantic links and images: use anchor elements with real href attributes and descriptive names, add target/rel wh…
EasyHTML Additional metadata: Practice priority: High
Positioning: Relative/Absolute Badge
This pattern is used in notifications, status indicators, and card metadata, so the badge should remain anchored even as…
EasyCSS Additional metadata: Practice priority: High
SEO: Essential <head> Metadata
You’re given a simple marketing page that renders fine in the browser, but it’s missing production-grade <head> metadata…
EasyHTML Additional metadata: Practice priority: High
Shallow Clone (Object or Array)
Implement shallowClone(value) in JavaScript. Your function should accept an object or array and return a new top-level c…
EasyJavaScript Additional metadata: Practice priority: High
Sleep / Delay Promise
Implement sleep(ms) that returns a Promise resolving after ms milliseconds. Use it to pause async flows like retries, ex…
EasyJavaScript Additional metadata: Practice priority: High
Debugging
Stop mutating caller data in unique
A teammate tried to make unique(arr) look clever with a one-liner. The returned values seem close, but two subtle bugs s…
EasyJavaScript Additional metadata: Practice priority: High
Update Array at Index (Immutable)
Return a new array with one index updated, leaving the original array untouched. This is the core immutable update patte…
EasyJavaScript Additional metadata: Practice priority: High
Build a Dropdown as a JavaScript Class, Then Port It to React
Build one basemap picker twice: first as a plain JavaScript class that creates and updates its own DOM, then as a React…
IntermediateReact Additional metadata: Practice priority: High
Create a Deferred Promise (For Async Tests)
Implement createDeferred() in JavaScript. Your function should return { promise, resolve, reject } so async tests can co…
IntermediateJavaScript Additional metadata: Practice priority: High
Create a Spy Function (Test Double)
Implement createSpy(impl?) to produce a callable spy that records every call (args + this) and optionally delegates to a…
IntermediateJavaScript Additional metadata: Practice priority: High
Data Helper 1: Get Value by Path
Implement getByPath(obj, path, fallback?) that safely reads a nested value from an object. This is extremely common in f…
IntermediateJavaScript Additional metadata: Practice priority: High
Fetch JSON with Timeout + Abort
Implement fetchJson(url, options) that fetches JSON with built-in timeout and abort support. It should abort on timeout,…
IntermediateJavaScript Additional metadata: Practice priority: High
Filter a Tree by Substring and Render It Indented
Given an n-ary tree of { value, children } nodes and a needle string, drop every node whose value contains the needle to…
IntermediateJavaScript Additional metadata: Practice priority: High
Debugging
Fix a shipment board that stopped updating after going zoneless
The shipment board moved to zoneless change detection, and its list to OnPush, in the last release. Three reports came i…
IntermediateAngular Additional metadata: Practice priority: High
Debugging
Fix lost this binding in callback registration
A teammate passes an object method straight into a callback API, assuming it will still remember its owner later. Direct…
IntermediateJavaScript Additional metadata: Practice priority: High
Debugging
Fix stale closure in delayed autosave callback
A teammate tried to make autosave "predictable" by capturing the current draft when wiring a delayed callback. That feel…
IntermediateJavaScript Additional metadata: Practice priority: High
Fluid Type & Spacing with clamp()
Implement fluid typography and spacing with clamp(). Use clamp(min, preferred, max) to scale values across viewport size…
IntermediateCSS Additional metadata: Practice priority: High
Forms: Validation and Required Fields
Build a signup form using native HTML5 validation: required fields, type constraints, minlength, and pattern. The browse…
IntermediateHTML Additional metadata: Practice priority: High
Implement instanceof
Implement the ordinary prototype-chain core of instanceof: first require a callable right-hand side with an object/funct…
IntermediateJavaScript Additional metadata: Practice priority: High
Promise.any (First Fulfilled)
Implement promiseAny(iterable) for synchronous iterables of values and promises. Resolve with the first fulfillment, ign…
IntermediateJavaScript Additional metadata: Practice priority: High
Retry a Promise-Returning Function with Delay
Implement retryWithDelay(fn, retries, delayMs): call a promise-returning function, and when it fails wait delayMs and tr…
IntermediateJavaScript Additional metadata: Practice priority: High
Run With a Performance Budget (Sync or Async)
Implement runWithPerfBudget(fn, budgetMs, now?) to time a sync or async function and report whether it stayed within a b…
IntermediateJavaScript Additional metadata: Practice priority: High
Sanitize href URL (Block javascript: XSS)
Implement sanitizeHrefUrl(input) for an allowlist: explicit http, https, mailto, and tel URLs plus relative URLs that st…
IntermediateJavaScript Additional metadata: Practice priority: High
Take Latest (Abort Previous Requests)
Implement takeLatest(fn) that wraps an async function and guarantees only the most recent call can resolve. Each new cal…
IntermediateJavaScript Additional metadata: Practice priority: High
Virtualized List: 10,000 Rows, Twenty Nodes
Turn a list that renders all 10,000 payment rows into one that renders twenty: a window that follows the scroll position…
IntermediateReact Additional metadata: Practice priority: High
Debugging
Fix async race in fetchWithCache
A teammate built a shared fetch helper to avoid duplicate network work, but real traffic exposed two nasty bugs. Concurr…
HardJavaScript Additional metadata: Practice priority: High
Implement Function.prototype.bind
Implement a deliberately scoped myBind(fn, thisArg, ...boundArgs) exercise. It must bind this for ordinary calls, suppor…
HardJavaScript Additional metadata: Practice priority: High
Implement the new Operator
Implement myNew(Constructor, ...args) with the language's construction primitive. It must accept ECMAScript constructabl…
HardJavaScript Additional metadata: Practice priority: High
Check if Two Arrays Are Equal
Check whether two arrays are equal by length and by value at each index. This is a shallow equality check for primitive…
EasyJavaScript Additional metadata: Practice priority: Medium
Cleanup Bag (Dispose Subscriptions)
Implement createCleanupBag() that helps prevent memory leaks by tracking cleanup functions (like removing event listener…
EasyJavaScript Additional metadata: Practice priority: Medium
Create a Counter Function
Implement createCounter(n), which returns a counter function. Its first call returns n, and each later call returns one…
EasyJavaScript Additional metadata: Practice priority: Medium
Create Object with Prototype
Implement objectCreate(proto) to return a new object whose prototype is proto. Use a temporary constructor function or O…
EasyJavaScript Additional metadata: Practice priority: Medium
Display & Centering: Center Inline Content
This is a horizontal alignment task, so avoid flex unless vertical alignment is explicitly required by the prompt. Use t…
EasyCSS Additional metadata: Practice priority: Medium
Escape HTML for Safe Text
Implement escapeHtml(text) to encode &, <, >, " and ' when raw text must be interpolated into the HTML text-content port…
EasyJavaScript Additional metadata: Practice priority: Medium
Falsy Bouncer
Remove all falsy values from an array while preserving order. Use a boolean filter to drop false, 0, empty string, null,…
EasyJavaScript Additional metadata: Practice priority: Medium
Flatten One Level
This should not deep-flatten; only the first nesting level is removed, matching Array.prototype.flat(1). Use it to norma…
EasyJavaScript Additional metadata: Practice priority: Medium
Inline vs Block Elements
Demonstrate the difference between block and inline elements using pure HTML. Show that block elements start new lines w…
EasyHTML Additional metadata: Practice priority: Medium
Lists and Navigation
Build a semantic navigation bar using nav > ul > li > a with hash links. Use CSS :target to show only one section at a t…
EasyHTML Additional metadata: Practice priority: Medium
Once (Function Wrapper)
Implement once(fn) that returns a wrapper which executes fn only on the first call. Cache and return the result on subse…
EasyJavaScript Additional metadata: Practice priority: Medium
Querystring Helper 1: Implement parseQueryString
Implement parseQueryString(qs) that converts a URL querystring into a plain object. This is very common in frontend work…
EasyJavaScript Additional metadata: Practice priority: Medium
Selectors & Text: Hero Title + Lead + Emphasis (Interview Warm-up)
Style a small hero header using both element and class selectors. Establish base typography on element selectors, then o…
EasyCSS Additional metadata: Practice priority: Medium
Todo List (Component with Local State)
Create a local-state todo list: add, toggle, and remove items. Keep input state controlled, generate stable ids, and upd…
EasyReact Additional metadata: Practice priority: Medium
Valid Parentheses (Balanced Brackets)
Implement isValidParentheses(s): return true when every (, [ and { in the string is closed by the matching bracket in th…
EasyJavaScript Additional metadata: Practice priority: Medium
Build a Tree from a Flat List of Nodes
Implement buildTree(items): turn a flat list of { id, parentId, ...fields } records into a forest of nodes where every n…
IntermediateJavaScript Additional metadata: Practice priority: Medium
Debugging
Counter stuck at 0 after an OnPush refactor
The counter display moved into its own OnPush component to save change detection work. Since then, clicking Increment le…
IntermediateAngular Additional metadata: Practice priority: Medium
Format Date in Time Zone (YYYY-MM-DD)
Implement formatDateInTimeZone(date, timeZone) to return a YYYY-MM-DD string for a given Date (or timestamp) in a specif…
IntermediateJavaScript Additional metadata: Practice priority: Medium
Implement arrayForEach (no prototype mutation)
You should also ensure the callback is invoked with the correct thisArg and that the method returns undefined like the n…
IntermediateJavaScript Additional metadata: Practice priority: Medium
Measure Function Duration (Profiling Wrapper)
Implement measure(fn, now?) to profile execution time. It should run a function, measure the duration using the provided…
IntermediateJavaScript Additional metadata: Practice priority: Medium
Poll Until (with Timeout + Abort)
Implement pollUntil(check, { interval, timeout, signal }) so a real deadline, cancellation, or the first truthy check se…
IntermediateJavaScript Additional metadata: Practice priority: Medium
Storage TTL Cache (localStorage/sessionStorage)
Implement createTtlStorage(storage, now?) that returns { set, get, remove }. It should store JSON values with an optiona…
IntermediateJavaScript Additional metadata: Practice priority: Medium
Stream to Text (ReadableStream -> string)
Implement streamToText(stream, options) that reads a ReadableStream<Uint8Array> and returns the full string. Use TextDec…
IntermediateJavaScript Additional metadata: Practice priority: Medium
Transitions & Transforms: Lift on Hover
Create a hover lift effect with transform and transition. Combine a slight translate/scale with a deeper box-shadow to s…
IntermediateCSS Additional metadata: Practice priority: Medium
Create an LRU Cache (Bounded Memory)
Implement createLruCache(maxSize) to keep a bounded, eviction-based cache. This is a classic way to prevent "memory leak…
HardJavaScript Additional metadata: Practice priority: Medium
React Snake Game (Grid + Food + Collision)
Build a Snake game in React using a grid board. Support keyboard controls, food spawning, score updates, and game-over h…
HardReact Additional metadata: Practice priority: Medium
Capitalize Words
Capitalize the first letter of every word while preserving spacing. Handle multiple spaces and punctuation without colla…
EasyJavaScript Additional metadata: Practice priority: Medium
Check if an Object or Array is Empty
Implement isEmpty(obj) that returns true only if the input is an object or array with no own keys/elements, and false ot…
EasyJavaScript Additional metadata: Practice priority: Medium
Clamp
Implement clamp(value, lower, upper) to keep a number within an inclusive range. If the value is below the lower bound,…
EasyJavaScript Additional metadata: Practice priority: Medium
Color Contrast Ratio (WCAG)
Implement contrastRatio(foreground, background): return the WCAG 2 contrast ratio between two hex colors (#rgb or #rrggb…
EasyJavaScript Additional metadata: Practice priority: Medium
Count Vowels
Implement countVowels(str) that returns how many vowels appear in a string. Normalize case, decide whether to include 'y…
EasyJavaScript Additional metadata: Practice priority: Medium
React Counter (Guarded Decrement)
Build a React counter component with the useState hook. Initialize the count at zero, wire increment and guarded decreme…
EasyReact Additional metadata: Practice priority: Medium
Safe JSON Parse (Fallback on Error)
Implement safeJsonParse(text, fallback = null) to safely parse JSON. It should return the parsed value for valid JSON st…
EasyJavaScript Additional metadata: Practice priority: Medium
Sum of Numbers in an Array
Sum only numeric values from an input array, ignoring non-numbers and NaN. This reinforces safe type checking, accumulat…
EasyJavaScript Additional metadata: Practice priority: Medium
Validate Username (Rules + Edge Cases)
Implement validateUsername(name) to enforce common username rules and handle edge cases safely. Rules: 3–16 chars, lower…
EasyJavaScript Additional metadata: Practice priority: Medium
Warm-Up: Basic Structure
Build a valid HTML document skeleton with <!doctype html>, <html>, <head>, and <body>. Include a <meta charset> and <tit…
EasyHTML Additional metadata: Practice priority: Medium
Resolve package.json Exports (Import vs Require)
Implement resolvePackageEntry(pkg, options) to choose the correct entry file for a package based on package.json fields…
HardJavaScript Additional metadata: Practice priority: Medium
Debug: Component Renders Twice on Every Update
Fix a component that renders twice per click because it stores derived state in useEffect. The correct fix is to remove…
PremiumIntermediateReact Additional metadata: Practice priority: High
React Debounced Search with Fake API
Build a React debounced search input with fake API calls. Use useEffect + setTimeout cleanup to cancel pending debounce…
PremiumIntermediateReact Additional metadata: Practice priority: High
Reusable Child Component with @Input/@Output (Two-way Binding)
Expose a value input and a valueChange output to support two-way binding, and let the parent own the source of truth thr…
PremiumIntermediateAngular Additional metadata: Practice priority: High
StrictMode-safe Effect Setup and Cleanup
Build an idempotent connection effect whose setup and symmetrical cleanup tolerate React StrictMode’s intentional develo…
PremiumIntermediateReact Additional metadata: Practice priority: High
Remove Duplicates
Implement uniqueArray(arr) that removes duplicates while preserving order. Use a Set for O(n) time and clarify how to tr…
PremiumEasyJavaScript Additional metadata: Practice priority: High
Sort Numbers with Array.prototype.sort
Implement a function sortNumbers(arr, ascending = true) that returns a new array of numbers sorted numerically in ascend…
PremiumEasyJavaScript Additional metadata: Practice priority: High
Autocomplete Engine: Debounced Suggestions That Never Go Stale
Build the engine behind an autocomplete box as a plain JavaScript module: createAutocomplete(fetchSuggestions, options)…
PremiumIntermediateJavaScript Additional metadata: Practice priority: High
Contact Form (Component + HTTP)
Build a contact form using a React component with controlled inputs and basic validation. You will only work in src/App.…
PremiumIntermediateReact Additional metadata: Practice priority: High
Custom setTimeout/clearTimeout Timer Manager
Build a timer registry with mySetTimeout, myClearTimeout, and myClearAllTimeouts. Return your own numeric ids, store nat…
PremiumIntermediateJavaScript Additional metadata: Practice priority: High
Data Helper 2: Set Value by Path
Implement setByPath(obj, path, value) that returns a new object/array tree with the value written at the nested path. No…
PremiumIntermediateJavaScript Additional metadata: Practice priority: High
Debug: Product Search That Misuses Its API
Debug a React product search page that misuses its search API, then add one small feature. Four user reports arrived: "T…
PremiumIntermediateReact Additional metadata: Practice priority: High
Debug: Transcript Highlight That Lags Behind the Audio
Debug a React dubbing review player whose transcript highlight lags behind the audio, then add one small feature. Four r…
PremiumIntermediateReact Additional metadata: Practice priority: High
Delegated Event Handler (E)
Implement delegate(root, eventType, selector, handler) for event delegation. Requirements: 1) Attach one event listener…
PremiumIntermediateJavaScript Additional metadata: Practice priority: High
Delete Dialog and Tooltips Through Portals
Fix a project settings screen whose delete dialog and help tooltips are clipped by the card around them: move both into…
PremiumIntermediateReact Additional metadata: Practice priority: High
Downloadable Files Table: Select All Across Pages
Build a table of downloadable files from a sensor export with a filter, a sort and a select all that stays correct acros…
PremiumIntermediateReact Additional metadata: Practice priority: High
Dubbing Review Board: Roll Line Statuses Up to Files
A dubbing project used to live in a spreadsheet: each row a voice line, each file a scene. Write createReviewBoard so th…
PremiumIntermediateJavaScript Additional metadata: Practice priority: High
Event Emitter (Mini Implementation)
Build a tiny event emitter with on, off, and emit. Store listeners per event, allow multiple listeners, and ensure off r…
PremiumIntermediateJavaScript Additional metadata: Practice priority: High
File Explorer Tree with Keyboard Navigation
Build a file explorer that renders a nested folder tree from data, sorted with folders first, where folders open and clo…
PremiumIntermediateReact Additional metadata: Practice priority: High
Debugging
Fix a fleet status board from three user bug reports
Three user reports arrived for the fleet status board. Report 1: "After I pick Offline and then Online, the list goes em…
PremiumIntermediateAngular Additional metadata: Practice priority: High
Folder Permissions Over Time: Who Could Open the File?
A shared drive keeps a history of permission changes: folders allow or deny users or groups, a folder inherits from the…
PremiumIntermediateJavaScript Additional metadata: Practice priority: High
Group By
Group an array of items by a key (function or property). Build an object or Map where each key maps to an array of items…
PremiumIntermediateJavaScript Additional metadata: Practice priority: High
Implement Array.prototype.filter
Recreate the native Array.prototype.filter() method as myFilter. It should call a provided callback once for each existi…
PremiumIntermediateJavaScript Additional metadata: Practice priority: High
Implement Array.prototype.map
Recreate the native .map() method without using it. Your myMap must call callbackFn(value, index, array) for each existi…
PremiumIntermediateJavaScript Additional metadata: Practice priority: High
Implement Array.prototype.reduce
Recreate the native .reduce() method without using it. Your myReduce must call the reducer with (accumulator, currentVal…
PremiumIntermediateJavaScript Additional metadata: Practice priority: High
Implement lodash.get
Implement get(obj, path, defaultValue) where path is a string like user.profile.name or a[0].b. Return defaultValue when…
PremiumIntermediateJavaScript Additional metadata: Practice priority: High
Implement Promise.all
Implement a function promiseAll(promises) that behaves like Promise.all. It should take an array of values or promises a…
PremiumIntermediateJavaScript Additional metadata: Practice priority: High
Implement useMemo and a Context Data Provider
Implement useMemo yourself, then build a context that serves API results to several components. Part 1: write useMemoize…
PremiumIntermediateReact Additional metadata: Practice priority: High
Invite Chips Input (Tags + Autocomplete)
Build a Material-like invite field in React. As users type, show autocomplete suggestions, convert selections into remov…
PremiumIntermediateReact Additional metadata: Practice priority: High
Listing Booking Widget: Dates, Guests and Total Price
Build a booking widget for one listing: it prices a stay from check-in and check-out dates and the number of adults and…
PremiumIntermediateReact Additional metadata: Practice priority: High
Longest Substring Without Repeating Characters
Implement lengthOfLongestSubstring(s): return the length of the longest substring of s in which no character repeats. A…
PremiumIntermediateJavaScript Additional metadata: Practice priority: High
Memoization
Implement memoize(fn) that caches results for repeated calls. Choose a cache key strategy, discuss memory growth/evictio…
PremiumIntermediateJavaScript Additional metadata: Practice priority: High
Merge Request Review: Issue List Label Filter
Review a merge request that adds label filters and an open-issue count to a small Vue 3 issue list, then fix what should…
PremiumIntermediateVue Additional metadata: Practice priority: High
Modal: Native <dialog> Confirm (Accessible Naming)
Build a native confirm dialog for deleting a project using the HTML <dialog> element. The dialog must be accessible (pro…
PremiumIntermediateHTML Additional metadata: Practice priority: High
Multi-step Signup Form
Build a 3-step signup flow in React that collects basic info, address info, and then shows a read-only summary before su…
PremiumIntermediateReact Additional metadata: Practice priority: High
Quantity Stepper Form Control (ControlValueAccessor)
Build a quantity stepper that a reactive form can drive like any other control: implement ControlValueAccessor so the fo…
PremiumIntermediateAngular Additional metadata: Practice priority: High
React Nested Checkbox Tree (Parent–Child Sync)
Build a small React UI that renders a parent checkbox and multiple child checkboxes. The parent controls all children, a…
PremiumIntermediateReact Additional metadata: Practice priority: High
React Nested Comments (Infinite Replies, Single Active Reply Input)
Build a React nested comments panel with infinite replies. Users can add top-level comments and reply to any comment, cr…
PremiumIntermediateReact Additional metadata: Practice priority: High
React Paginated Data Table
Build a simple paginated data table in React that shows a static list of users. Display 5 rows per page, with Previous /…
PremiumIntermediateReact Additional metadata: Practice priority: High
React Shopping Cart Mini
Build a small shopping cart UI in React. Show a list of products, let the user add them to the cart, adjust quantities,…
PremiumIntermediateReact Additional metadata: Practice priority: High
Receipt Upload: Drop Zone, Progress and Previews
Turn a receipts list that takes any file and uploads nothing into a working uploader: a drop zone that stays lit over it…
PremiumIntermediateReact Additional metadata: Practice priority: High
Speech Studio: Wire a Panel to a Typed Speech Service
Wire a given speech panel to a speech service you know only from its TypeScript types: load the voices, keep Generate wi…
PremiumIntermediateReact Additional metadata: Practice priority: High
Support Console: Role-Aware Routes and Sidebar
Turn a support console that shows every page to everyone into one that follows roles: routes matched by whole segments,…
PremiumIntermediateReact Additional metadata: Practice priority: High
Throttle Function
Implement a function throttle(fn, interval) that ensures fn is executed at most once during every interval milliseconds,…
PremiumIntermediateJavaScript Additional metadata: Practice priority: High
Battery Site Layout Planner (Take-Home Style)
Build a planner for an industrial battery site: the user picks how many of four battery sizes to install, the planner ad…
PremiumHardReact Additional metadata: Practice priority: High
Debugging
Bug Squash: Fix an Unfamiliar Invoicing Repo
You joined the team that owns a small invoicing library: five files under src/ you have not seen before. Support forward…
PremiumHardJavaScript Additional metadata: Practice priority: High
Chat UI with Streaming Response
Build a simplified ChatGPT-like interface that streams an assistant response token-by-token. The goal is to model chat s…
PremiumHardReact Additional metadata: Practice priority: High
Concurrency-Limited Map (order-preserving)
Implement a concurrency-limited async map that preserves order. Run at most N promises at a time, resolve results in inp…
PremiumHardJavaScript Additional metadata: Practice priority: High
Deep Clone
Create a deep clone of an object/array so nested structures are copied by value. Discuss limits (functions, dates, cycle…
PremiumHardJavaScript Additional metadata: Practice priority: High
Deep Equal
Implement a function deepEqual(a, b) that returns true when two values are deeply equal — primitives by value and object…
PremiumHardJavaScript Additional metadata: Practice priority: High
Delegated Event Handler (M)
Implement delegate(root, eventType, selector, handler, options?) with advanced event delegation. Requirements: 1) Attach…
PremiumHardJavaScript Additional metadata: Practice priority: High
Order Book Over a Socket: Snapshot, Sequence and Burst
Build an order book that loads a snapshot, applies deltas from a socket in sequence order, recovers from a lost message…
PremiumHardReact Additional metadata: Practice priority: High
Querystring Helper 3: Implement parseQueryStringAdvanced
Implement parseQueryStringAdvanced(qs) that converts a URL querystring into a nested object structure. This mirrors real…
PremiumHardJavaScript Additional metadata: Practice priority: High
Select With Compound Components (Single + Multi)
Design and build a compound Select component: one API that works as a single-select or a multi-select and lets each opti…
PremiumHardReact Additional metadata: Practice priority: High
TV Home Screen: Remote Focus, Lazy Rows and Details
Turn a streaming home screen built for a mouse into one a TV remote can drive: arrow keys that keep their column across…
PremiumHardReact Additional metadata: Practice priority: High
Webhook Deliveries Console: Four Tasks in One Hour
Extend a small React and TypeScript webhook-deliveries console in one hour: show every request state, type an unknown pa…
PremiumHardReact Additional metadata: Practice priority: High
Add Large Integers as Strings
Add two non-negative integers represented as strings and return the sum as a string. You may not convert the entire stri…
PremiumEasyJavaScript Additional metadata: Practice priority: Medium
Find Maximum Occurring Character
Find the most frequent character in a string using a frequency map. Track counts in one pass and return the character wi…
PremiumEasyJavaScript Additional metadata: Practice priority: Medium
Image Slider (Dots + Previous/Next)
Build a simple React image slider with previous/next buttons and dot navigation. Show the current slide, its title, and…
PremiumEasyReact Additional metadata: Practice priority: Medium
Merge Two Sorted Arrays
Merge two already-sorted arrays into a single sorted array. Do not call sort on the combined output; the merge should ta…
PremiumEasyJavaScript Additional metadata: Practice priority: Medium
Reverse a String
Reverse a string by iterating from the end to the start and building a new string, without using Array.prototype.reverse…
PremiumEasyJavaScript Additional metadata: Practice priority: Medium
Selector Polyfill 1: Implement matchesSimple
Implement matchesSimple(node, selector) — a tiny subset of Element.matches(). This is extremely common in frontend inter…
PremiumEasyJavaScript Additional metadata: Practice priority: Medium
3Sum (find unique triplets that sum to zero)
Given an array of integers, return all unique triplets [a, b, c] such that a + b + c = 0. Triplets should be unique, and…
PremiumIntermediateJavaScript Additional metadata: Practice priority: Medium
Add Two Promises
This is a small async composition task and should return a Promise that resolves to the numeric sum once both inputs set…
PremiumIntermediateJavaScript Additional metadata: Practice priority: Medium
Build a DOM Renderer from a Nested Object
Implement render(node) to convert a JSON-like DOM description into real DOM nodes using createElement/createTextNode. Co…
PremiumIntermediateJavaScript Additional metadata: Practice priority: Medium
Debugging
Case: Find the Bug in an Intern's Budget Summary
Capital One's Power Day case, as a 2024 senior account describes it: find the bug in a budgeting program written by an i…
PremiumIntermediateJavaScript Additional metadata: Practice priority: Medium
Debugging
Case: Review a Junior's Caption Code, Then Rewrite It in One Pass
This case runs in two parts. First a review: work an example by hand, mark the lines you would change and say why while…
PremiumIntermediateJavaScript Additional metadata: Practice priority: Medium
Clear All Timers + Render DOM Elements
Solve two independent tasks: implement clearAllTimeouts for a timer registry and render a DOM tree from a nested object.…
PremiumIntermediateJavaScript Additional metadata: Practice priority: Medium
Compose Function
Implement compose(...fns) that returns a new function applying the provided functions from right to left. The rightmost…
PremiumIntermediateJavaScript Additional metadata: Practice priority: Medium
Curry Function
Implement curry(fn) to transform a multi-argument function into chained calls. Collect arguments across invocations, all…
PremiumIntermediateJavaScript Additional metadata: Practice priority: Medium
DOM Tree Walk 2: Find Closest Ancestor
Implement closestWithin(node, selector, boundary) for a DOM-like tree. This is a simplified .closest() used constantly i…
PremiumIntermediateJavaScript Additional metadata: Practice priority: Medium
Find a Node in a DOM Tree (DFS/BFS)
Implement findNode(root, predicate) to traverse the DOM and return the first matching element. Use DFS/BFS with early ex…
PremiumIntermediateJavaScript Additional metadata: Practice priority: Medium
Find the Corresponding Node in Twin DOM Trees
Given two identical DOM trees and a node in tree A, return the corresponding node in tree B. Aim for O(n) time and O(h)…
PremiumIntermediateJavaScript Additional metadata: Practice priority: Medium
Flatten with Depth
Implement flatten(arr, depth) that flattens nested arrays up to a specific depth. Depth controls how many nesting levels…
PremiumIntermediateJavaScript Additional metadata: Practice priority: Medium
Implement JSON.stringify
Implement jsonStringify(value): return exactly what JSON.stringify(value) returns, or undefined when it returns undefine…
PremiumIntermediateJavaScript Additional metadata: Practice priority: Medium
Querystring Helper 2: Implement stringifyQueryString
Implement stringifyQueryString(params) that converts an object into a URL querystring. This is common in FE screens (bui…
PremiumIntermediateJavaScript Additional metadata: Practice priority: Medium
React Accordion / FAQ Component
Build a simple FAQ (accordion) UI in React using component state. Clicking a question should toggle its answer. By defau…
PremiumIntermediateReact Additional metadata: Practice priority: Medium
React Countdown Timer (Start, Pause, Reset)
Build a React countdown timer with a seconds input and Start, Pause and Reset controls. The clock shows mm:ss, ticks onc…
PremiumIntermediateReact Additional metadata: Practice priority: Medium
React Filterable / Searchable User List
Filter a React user list by search text and role. Derive filtered results without mutating the source array, and show an…
PremiumIntermediateReact Additional metadata: Practice priority: Medium
React Transfer List (Select + Move Between Two Lists)
Build a React transfer list UI with two panels and checkbox selection. Users select items in one list and move them to t…
PremiumIntermediateReact Additional metadata: Practice priority: Medium
Selector Polyfill 2: Implement closestSimple
Implement closestSimple(node, selector) — a DOM-like polyfill for Element.closest() using only parentNode traversal. Why…
PremiumIntermediateJavaScript Additional metadata: Practice priority: Medium
Abortable Helpers (Timeout + Composed Abort)
Provide utilities to combine timeouts with AbortController, and to compose multiple signals (abort if any fires). All he…
PremiumHardJavaScript Additional metadata: Practice priority: Medium
Data Helper 3: Deep Clone with Cycles
Implement deepClone(value) that returns a deep copy of the input while correctly handling circular references. Requireme…
PremiumHardJavaScript Additional metadata: Practice priority: Medium
Delegated Event Handler (H)
Implement delegated event handling: attach one listener to a parent, match events by selector, and call the handler with…
PremiumHardJavaScript Additional metadata: Practice priority: Medium
Streaming NDJSON Parser (Web Streams)
Build an NDJSON streaming parser that reads chunked text and emits JSON objects line by line. Handle partial lines acros…
PremiumHardJavaScript Additional metadata: Practice priority: Medium
Angular Chessboard Click/Highlight (N×N Board)
Build an interactive N×N chessboard in Angular. Clicking a cell should highlight it and clear the previous selection. Ad…
PremiumEasyAngular Additional metadata: Practice priority: Medium
Median of Array
Return the median of a list of numbers. For even length, return the average of the two middle values. Do not mutate the…
PremiumEasyJavaScript Additional metadata: Practice priority: Medium
React Chessboard Click/Highlight (N×N Board)
Build an interactive N×N chessboard in React. Clicking a cell should highlight it and clear the previous selection. Incl…
PremiumEasyReact Additional metadata: Practice priority: Medium
React Dynamic Table (Rows × Columns)
Generate a dynamic table in React from row/column inputs. Normalize values, rebuild the grid on action, and render consi…
PremiumEasyReact Additional metadata: Practice priority: Medium
React Like Button (Toggle + Counter)
Build a React Like button that toggles between liked/unliked and updates a count. Clicking should add or subtract one ba…
PremiumEasyReact Additional metadata: Practice priority: Medium
React Progress Bar (0–100 with Threshold Colors)
Build a React progress bar for values 0–100 with +10%/−10% controls. Clamp progress to the valid range and change the ba…
PremiumEasyReact Additional metadata: Practice priority: Medium
React Star Rating Widget
Implement a reusable <StarRating /> widget in React. It should render a row of clickable stars, allow the user to select…
PremiumEasyReact Additional metadata: Practice priority: Medium
Tic-Tac-Toe (Component State + Winner Detection)
Build Tic-Tac-Toe with React state: a 9-cell board, alternating turns, win/draw detection, and a reset button. Prevent o…
PremiumEasyReact Additional metadata: Practice priority: Medium
Valid Anagram
Return true if two strings are anagrams (same characters with the same counts). Treat strings as case-sensitive and incl…
PremiumEasyJavaScript Additional metadata: Practice priority: Medium
Vue Chessboard Click/Highlight (N×N Board)
Build an interactive N×N chessboard in Vue 3. Clicking a cell should highlight it and clear the previous selection. Add…
PremiumEasyVue Additional metadata: Practice priority: Medium
DOM Tree Walk 1: Collect Text Nodes
Implement collectText(node) that traverses a DOM-like tree and returns all text content (nodeType 3) in document order.…
PremiumIntermediateJavaScript Additional metadata: Practice priority: Medium
Implement Stack and Queue in JavaScript
Implement Stack (push/pop/peek/size) and Queue (enqueue/dequeue/peek/size). Every operation, dequeue included, should ta…
PremiumIntermediateJavaScript Additional metadata: Practice priority: Medium
Maze Traversal (Find a Path in a Grid)
Given a 2D grid of 0/1 (0=open, 1=wall), determine if a path exists from start to end using 4-direction moves. Aim for O…
PremiumIntermediateJavaScript Additional metadata: Practice priority: Medium
React Dynamic Counter Buttons (Grow-on-Click)
In React, let users add or remove step buttons dynamically, and have each button update the counter by its own step valu…
PremiumIntermediateReact Additional metadata: Practice priority: Medium
React Tabs / Multi-View Switcher
Implement React tabs with a single activeTab state. Buttons update the value and conditional rendering shows only the ac…
PremiumIntermediateReact Additional metadata: Practice priority: Medium
React Theme Toggle with Persisted Light/Dark Mode
Add a global light/dark theme toggle using React Context. The selected theme should be stored in localStorage and restor…
PremiumIntermediateReact Additional metadata: Practice priority: Medium
Recover a BST with Two Swapped Nodes
Two nodes in a Binary Search Tree were swapped by mistake. Implement recoverBST(root) to fix the tree in-place (swap the…
PremiumIntermediateJavaScript Additional metadata: Practice priority: Medium
DOM Tree Walk 3: Basic Selector Engine (Hard)
Implement a small selector engine: queryAll(root, selector) that returns all matching nodes in document order from a DOM…
PremiumHardJavaScript Additional metadata: Practice priority: Medium
Selector Polyfill 3: Implement queryAllSimple (Hard)
Implement queryAllSimple(root, selector) — a DOM-like polyfill for querySelectorAll. This is a high-likelihood frontend…
PremiumHardJavaScript Additional metadata: Practice priority: Medium
Check if a String Is a Palindrome
Normalize the input (lowercase + strip non-alphanumerics) and check if it reads the same forwards and backwards using tw…
PremiumEasyJavaScript Additional metadata: Practice priority: Low
Related prepNeed explanations instead of coding?Open interview Q&A Want the highest-signal questions only?Open Essential 60

Interview questions by technology

Review concepts and answers alongside your coding practice.

Practice paths

Explore challenge categories

Focused paths for implementation and debugging practice.