Lead Frontend
​
​
Log inSign up
© 2026 Lead Frontend. Free educational content, provided as is; it may contain errors. Not affiliated with any company or product named on this site.
TermsPrivacyDisclaimerCopyrightLicenses & credits

All questions

Every question across every format, in one place.

Progress

0 / 658 completed

​
​
​
Format
​
Difficulty
​
Category
​
Topic
​
Company
​
Status
Recommended
Sort
JS Functions · 119
UI Coding · 59
Algorithms · 46
Quiz · 361
System Design · 33
Behavioral · 40

Showing 658 questions

Best Time to Buy and Sell Stock

Find the largest gain from one buy followed by one later sell in a price history.

Algorithms
Easy
15 min

Binary Search

Find a value's index in a sorted array in logarithmic time.

Algorithms
Easy
15 min

Binary Search Tree

Implement a binary search tree class with insert, lookup, delete, min/max and sorted iteration.

Algorithms
Medium
35 min

Binary Tree Traversals

Return the pre-order, in-order and post-order traversals of a binary tree.

Algorithms
Easy
20 min

Breadth-First Search

Find the fewest clicks between two pages of a site with breadth-first search.

Algorithms
Medium
20 min

Climbing Stairs

Count the ways to reach the top taking one or two steps at a time, the gentlest intro to DP.

Algorithms
Easy
15 min

Coin Change

Find the fewest coins (or credit packs) that add up exactly to an amount, using dynamic programming.

Algorithms
Medium
25 min

Combination Sum

List every multiset of values (reuse allowed) that adds up to a target, without duplicates.

Algorithms
Medium
25 min

Course Schedule

Decide whether a set of lessons with prerequisites can all be completed, by detecting cycles.

Algorithms
Medium
25 min

Depth-First Search

Traverse a graph depth-first from a start node and return the order nodes are visited.

Algorithms
Medium
20 min

Group Anagrams

Bucket words that are rearrangements of each other using a canonical hash key.

Algorithms
Medium
20 min

Heap Sort

Sort an array in place in guaranteed O(n log n) time using a binary max-heap.

Algorithms
Medium
30 min

House Robber

Pick non-adjacent items to maximise their total value, a classic 1-D dynamic programming problem.

Algorithms
Medium
20 min

Insert Interval

Add a new booking to a sorted list of busy blocks, merging where needed, in linear time.

Algorithms
Medium
20 min

Insertion Sort

Sort an array in place by growing a sorted prefix one element at a time.

Algorithms
Easy
15 min

Kth Largest Element

Find the k-th largest value without fully sorting, using a size-k heap or quickselect.

Algorithms
Medium
25 min

Binary Tree Level Order Traversal

Group a tree's values by depth, row by row, using breadth-first search.

Algorithms
Medium
20 min

Linked List

Implement a linked list class with insertion and removal at both ends, by index, and in-place reversal.

Algorithms
Medium
30 min

Longest Increasing Subsequence

Find the length of the longest strictly increasing subsequence, from O(n²) DP to O(n log n) patience sorting.

Algorithms
Medium
30 min

Longest Substring Without Repeating Characters

Find the length of the longest run of characters with no repeats using a sliding window.

Algorithms
Medium
20 min

Lowest Common Ancestor

Find the closest shared ancestor of two nodes in a DOM-like tree.

Algorithms
Medium
25 min

Maximum Subarray

Find the contiguous stretch with the largest sum using Kadane's algorithm.

Algorithms
Medium
20 min

Meeting Rooms II

Find the minimum number of rooms (or calendar columns) needed so no two overlapping meetings share one.

Algorithms
Medium
25 min

Merge Intervals

Collapse overlapping calendar events into the minimal set of busy blocks.

Algorithms
Medium
20 min

Merge Sort

Sort an array of numbers with the divide-and-conquer merge sort algorithm in O(n log n).

Algorithms
Medium
25 min

Min Heap

Implement a binary min-heap priority queue with a custom comparator.

Algorithms
Medium
30 min

Non-overlapping Intervals

Drop the fewest bookings so the remaining ones never overlap.

Algorithms
Medium
25 min

Number of Islands

Count connected regions of filled cells in a grid with flood fill.

Algorithms
Medium
20 min

Permutations

Generate every ordering of a list of distinct items with backtracking.

Algorithms
Medium
20 min

Product of Array Except Self

For each position, compute the product of every other element without using division.

Algorithms
Medium
20 min

Queue

Build a first-in, first-out queue class with O(1) enqueue and dequeue.

Algorithms
Easy
15 min

Quick Sort

Sort an array in place with quicksort, staying fast on sorted input and heavy duplicates.

Algorithms
Medium
30 min

Rotate Matrix

Rotate a square grid 90° clockwise in place, like rotating an image's pixel grid.

Algorithms
Medium
20 min

Selection Sort

Sort an array in place by repeatedly selecting the smallest remaining element.

Algorithms
Easy
15 min

Serialize and Deserialize a Binary Tree

Encode a binary tree as a string and rebuild an identical tree from it.

Algorithms
Hard
35 min

Sliding Window Maximum

Report the peak value in every window of k consecutive samples in O(n) with a monotonic deque.

Algorithms
Hard
35 min

Spiral Matrix

Read a rectangular grid in clockwise spiral order using shrinking boundaries.

Algorithms
Medium
20 min

Stack

Build a last-in, first-out stack class, the structure behind undo history and the call stack.

Algorithms
Easy
10 min

Subsets

Generate the power set of a list of distinct items, such as every combination of feature flags.

Algorithms
Medium
20 min

Top K Frequent Elements

Return the k most frequent values in a list, faster than sorting everything.

Algorithms
Medium
20 min

Topological Sort

Order modules so each one comes after everything it imports, and detect circular imports.

Algorithms
Medium
30 min

Trie

Build a prefix tree that powers autocomplete: insert words, look them up and list completions.

Algorithms
Medium
30 min

Two Sum

Find the two items in a list whose values add up to a target, in a single pass with a hash map.

Algorithms
Easy
15 min

Valid Parentheses

Check that every bracket in a code snippet is closed by the right kind, in the right order.

Algorithms
Easy
15 min

Validate Binary Search Tree

Check whether a binary tree satisfies the BST ordering rule across whole subtrees, not just parent and child.

Algorithms
Medium
20 min

Word Search

Check whether a word can be traced through adjacent letter tiles using backtracking.

Algorithms
Medium
25 min

Tell me about a failure and what you learned

Describe a real failure you were responsible for, how you handled the fallout and what changed in how you work afterwards.

Behavioral
Easy
10 min

Tell me about a time you changed your mind

Show that you hold strong opinions loosely: what evidence or argument changed your position, and how you handled the reversal publicly.

Behavioral
Medium
10 min

Tell me about a time you advocated for accessibility

Show how you made accessibility a team and organisation priority, not a one-off fix, and how you measured progress.

Behavioral
Medium
15 min

Tell me about building consensus on a contested decision

Describe how you moved a divided group of engineers or teams to a decision everyone could commit to, even those who disagreed.

Behavioral
Hard
15 min

How do you handle burnout and keep a sustainable pace?

Explain how you spotted burnout on your team or in yourself, what you changed in planning and on-call, and how delivery held up.

Behavioral
Medium
15 min

Tell me about a time you delegated something important

Show how you hand off meaningful work, set up the person to succeed, and resist taking it back when it gets hard.

Behavioral
Medium
12 min

Tell me about delivering under a tight deadline

Show how you planned, cut risk and protected quality and people when a front-end delivery date could not move.

Behavioral
Medium
15 min

A disagreement with a product manager

Show how you handled a real conflict with product over scope, quality or approach, and reached a decision that served users and the business.

Behavioral
Medium
15 min

A disagreement with your manager

Describe pushing back on your own manager's decision, how you made your case, and how you committed once a decision was made.

Behavioral
Medium
15 min

Tell me about a time you drove alignment across multiple teams

Show how you got several teams with different priorities to agree on and deliver a shared front-end change.

Behavioral
Hard
15 min

Giving hard feedback

Describe delivering difficult feedback to a colleague, especially a strong or senior one, in a way that changed behaviour and kept trust.

Behavioral
Medium
15 min

How have you grown a senior engineer into a lead?

Describe a deliberate plan that turned a strong senior engineer into someone who leads people and projects, with evidence it worked.

Behavioral
Hard
15 min

Tell me about a time you had to deliver with unclear requirements

Show how you turned an ambiguous goal into a concrete plan by framing the problem, making assumptions explicit and learning quickly.

Behavioral
Medium
15 min

What is the hardest bug you have fixed?

Tell a debugging story that shows systematic investigation, technical depth and how you prevented the bug class from returning.

Behavioral
Easy
15 min

How have you improved hiring and interviewing on your team?

Explain your role in hiring front-end engineers: designing loops, calibrating interviewers, making fair decisions and measuring hiring quality.

Behavioral
Medium
15 min

Tell me about a time you improved your team's velocity

Explain how you diagnosed what was slowing a front-end team down, fixed the biggest bottlenecks and proved the improvement with data.

Behavioral
Hard
15 min

Influencing without authority

Show how you got other teams to adopt a front-end change you could not mandate, using evidence, low-friction paths and allies.

Behavioral
Hard
20 min

Tell me about a time you introduced a design system

Describe how you started or scaled a design system, partnered with design, drove adoption across teams and measured its value.

Behavioral
Hard
20 min

Tech lead, staff engineer or engineering manager: which track and why?

Explain the differences between the lead, staff and manager paths, and justify your own choice with evidence from your work.

Behavioral
Medium
12 min

Mentoring an underperforming engineer

Describe how you diagnosed why an engineer was struggling, set clear expectations, supported them and handled the outcome honestly.

Behavioral
Hard
20 min

Tell me about a time you migrated a legacy front-end codebase

Walk through an incremental migration from an old framework or architecture, covering the plan, risk management and how you kept shipping features.

Behavioral
Hard
20 min

Tell me about a time you negotiated scope cuts

Explain how you reshaped a front-end deliverable with product and design so it shipped on time without losing what users needed most.

Behavioral
Medium
15 min

How do you ramp up when you join or take over a new team?

Describe how you learned a new codebase, built trust and found your first high-impact contribution after joining or inheriting a team.

Behavioral
Medium
15 min

Tell me about a performance win with business impact

Walk through a web performance improvement you drove, how you tied Core Web Vitals to business metrics and how you kept the gains from regressing.

Behavioral
Medium
15 min

Prioritising tech debt against features

Explain how you made the business case for front-end tech debt work, balanced it with roadmap pressure and showed the payoff.

Behavioral
Hard
20 min

A production incident you owned

Walk through a front-end production incident: detection, mitigation, communication, root cause and the blameless follow-up that prevented a repeat.

Behavioral
Medium
15 min

Tell me about a project you led end to end

Walk through a front-end initiative you owned from problem framing to measured outcome, showing scope, trade-offs and how you led people.

Behavioral
Medium
15 min

Do you have any questions for me?

Use the last minutes of the interview to learn what you need to decide and to show how a lead thinks about a team.

Behavioral
Easy
10 min

How have you raised the quality bar on a team?

Describe how you improved testing, CI and review practices on a front-end team in a way that stuck and made shipping faster, not slower.

Behavioral
Hard
20 min

Receiving critical feedback

Share a time you received tough feedback, how you processed it, what you changed and how you checked that the change stuck.

Behavioral
Easy
10 min

How did you resolve a conflict between two engineers?

Describe stepping in when two engineers on your team were in conflict, how you found the real cause and what you did to restore a working relationship.

Behavioral
Hard
15 min

Walk me through an RFC or ADR you wrote

Explain a technical proposal you authored, how you framed the options, gathered feedback and drove it to a decision that held up.

Behavioral
Hard
20 min

Salary expectations and leveling: how do you handle the conversation?

Handle salary-expectation questions, down-leveling and competing offers calmly, with evidence and without damaging the relationship.

Behavioral
Medium
15 min

Tell me about a time you said no to a stakeholder

Show how you push back on a senior stakeholder's request with data, offer alternatives and keep the relationship intact.

Behavioral
Medium
15 min

Tell me about a time you set a technical vision for a front-end org

Describe how you defined a multi-quarter front-end direction, got buy-in, and turned it into a roadmap teams actually followed.

Behavioral
Hard
20 min

A technical decision you would make differently

Describe a significant front-end architecture decision that aged badly, how you recognised it and what you changed in how you decide.

Behavioral
Medium
15 min

Tell me about yourself (lead edition)

A two-minute career pitch that frames you as a front-end lead: scope, impact, how you lead and why this role is the next step.

Behavioral
Easy
10 min

Why are you leaving your current job?

Answer honestly and positively, framing the move around what you are moving towards, including tricky cases like layoffs or short tenures.

Behavioral
Easy
10 min

Why do you want to work here?

Give a specific, researched answer that connects the company's product and engineering challenges to your experience and goals.

Behavioral
Easy
10 min

How do you lead a remote or distributed team?

Explain how you keep a team spread across time zones aligned, unblocked and connected, with a concrete example of what you changed.

Behavioral
Medium
12 min

Array.prototype.at

Implement Array.prototype.at, including negative indices and the spec's integer coercion rules.

JS Functions
Easy
10 min

Array.prototype.concat

Implement Array.prototype.concat, including sparse arrays and Symbol.isConcatSpreadable.

JS Functions
Easy
15 min

Array.prototype.filter

Implement Array.prototype.filter with thisArg support and correct handling of sparse arrays.

JS Functions
Easy
10 min

Array.prototype.flat

Implement Array.prototype.flat with a depth argument, hole removal and an iterative variant.

JS Functions
Medium
15 min

Array.prototype.map

Implement Array.prototype.map, keeping holes in sparse arrays and supporting thisArg.

JS Functions
Easy
10 min

Array.prototype.reduce

Implement Array.prototype.reduce, including the no-initial-value rules and sparse arrays.

JS Functions
Easy
15 min

Array.prototype.square

Add a square() method to every array that returns a new array of squared values.

JS Functions
Easy
5 min

Async Queue with Priority

Run async tasks with a concurrency limit, starting higher-priority tasks first and keeping FIFO order within a priority.

JS Functions
Hard
35 min

Backbone Model

Build an observable Model class with defaults, get/set/unset, per-attribute change events, previous values and silent updates.

JS Functions
Hard
40 min

Cache Async (Deduplicate Requests)

Memoize an async function so concurrent calls share one in-flight promise, results expire after a TTL and failures are not cached.

JS Functions
Medium
25 min

Camel Case Keys

Deeply convert snake_case object keys from an API response into camelCase.

JS Functions
Medium
20 min

Cancellable Interval

Wrap setInterval so it returns a cancel function that stops future ticks.

JS Functions
Easy
5 min

Cancellable Timeout

Wrap setTimeout so it returns a cancel function instead of a timer id.

JS Functions
Easy
5 min

Chunk

Split an array into consecutive groups of a fixed size, with a shorter final group if needed.

JS Functions
Easy
10 min

Clamp

Restrict a number to an inclusive range between a lower and an upper bound.

JS Functions
Easy
5 min

classnames

Build a CSS class string from strings, numbers, nested arrays and conditional objects.

JS Functions
Medium
20 min

Compact

Return a new array with every falsy value removed.

JS Functions
Easy
5 min

Compose

Combine functions right to left into a single function, where each output feeds the next input.

JS Functions
Easy
10 min

Count By

Count how many elements of an array map to each key produced by an iteratee.

JS Functions
Easy
10 min

Curry

Turn a function of n arguments into one that can be called with those arguments one or several at a time.

JS Functions
Medium
20 min

Curry II (with placeholders)

Curry a function so that arguments can be supplied in any order using a placeholder value.

JS Functions
Hard
30 min

Data Merging

Merge workout session records by user: sum durations and combine equipment lists without duplicates.

JS Functions
Medium
20 min

Data Selection

Implement a small query function over an array of records: filtering, multi-key stable sorting, pagination and field projection.

JS Functions
Medium
30 min

Debounce

Delay invoking a function until a burst of calls has stopped for a given wait time.

JS Functions
Medium
20 min

Debounce II

Debounce with leading, trailing and maxWait options, plus cancel and flush.

JS Functions
Hard
35 min

Deep Clone

Make a deep copy of a JSON-like value so that no nested object or array is shared with the original.

JS Functions
Medium
15 min

Deep Clone II

Deep clone values with circular references, shared references, Date, RegExp, Map, Set, symbols and prototypes.

JS Functions
Hard
35 min

Deep Equal

Decide whether two JSON-like values are structurally equal, comparing nested objects and arrays by content.

JS Functions
Medium
20 min

Deep Map

Transform every leaf value in a nested object/array structure while preserving its shape.

JS Functions
Medium
20 min

Deep Merge

Recursively merge configuration objects without mutating the inputs, with clear rules for arrays and undefined.

JS Functions
Medium
25 min

Deep Omit

Remove the given keys from an object at every level of nesting, including inside arrays.

JS Functions
Medium
20 min

Dependency Injection Container

Build an IoC container with transient, singleton and scoped lifetimes, child scopes, overrides and circular-dependency detection.

JS Functions
Medium
35 min

Difference

Return the elements of an array that do not appear in any of the other given arrays.

JS Functions
Easy
10 min

Identical DOM Trees

Decide whether two DOM nodes are structurally identical: same tags, attributes, text and children, without using isEqualNode.

JS Functions
Medium
20 min

Drop Right While

Drop trailing elements of an array for as long as a predicate holds, scanning from the end.

JS Functions
Easy
10 min

Drop While

Drop leading elements of an array for as long as a predicate holds, then keep the rest.

JS Functions
Easy
10 min

Event Emitter

Implement an EventEmitter class with on, off and emit, the observer pattern behind Node's events module and DOM events.

JS Functions
Medium
20 min

Event Emitter II

Extend an event emitter with once, unsubscribe handles, bulk off and listener counts, with well-defined behaviour during emit.

JS Functions
Medium
25 min

Feature Flag Evaluator

Evaluate feature flags with a kill switch, targeting rules and a percentage rollout that uses stable hashing so users keep their bucket.

JS Functions
Medium
30 min

Fill

Overwrite a range of an array with a value, supporting negative start and end indices.

JS Functions
Easy
10 min

Find Index

Return the index of the first element that satisfies a predicate, starting from an optional index.

JS Functions
Easy
10 min

Find Last Index

Return the index of the last element that satisfies a predicate, searching backwards from an optional index.

JS Functions
Easy
10 min

Flatten

Flatten a nested array to a given depth, recursively or with an explicit stack.

JS Functions
Medium
20 min

From Pairs

Build an object from an array of [key, value] pairs, the inverse of Object.entries.

JS Functions
Easy
5 min

Function.prototype.apply

Implement Function.prototype.apply, including array-like argument lists and argument validation.

JS Functions
Medium
15 min

Function.prototype.bind

Implement Function.prototype.bind with partial application and correct behaviour under new.

JS Functions
Medium
20 min

Function.prototype.call

Implement Function.prototype.call without using call, apply or bind.

JS Functions
Medium
15 min

Get

Safely read a nested value from an object by a dot/bracket path, falling back to a default.

JS Functions
Medium
20 min

getElementsByClassName

Find every descendant element that has all of the given class names by walking the DOM tree yourself.

JS Functions
Medium
15 min

getElementsByStyle

Find descendant elements whose computed value for a CSS property equals a given value, normalising values like red vs #f00.

JS Functions
Medium
20 min

getElementsByTagName

Return every descendant element with a given tag name (or all of them for "*") by traversing the DOM tree.

JS Functions
Medium
15 min

Group By

Group the elements of an array into arrays keyed by the result of an iteratee.

JS Functions
Medium
15 min

Has

Check whether an object has an own property at a nested path, even when the value is undefined.

JS Functions
Medium
15 min

HTML Serializer

Turn a plain-object element tree into pretty-printed, correctly escaped HTML with indentation and void elements.

JS Functions
Easy
20 min

In Range

Check whether a number lies in a half-open range, with an optional start and swapped bounds.

JS Functions
Easy
10 min

instanceof

Re-implement the instanceof operator by walking the prototype chain.

JS Functions
Medium
15 min

Intersection

Return the unique values that appear in every one of the given arrays.

JS Functions
Medium
15 min

Is Empty

Decide whether a value is empty: no length, no size, or no own enumerable keys depending on its type.

JS Functions
Medium
15 min

jQuery Class Manipulation

Build a tiny $ wrapper with chainable addClass, removeClass, toggleClass and hasClass that work on every matched element.

JS Functions
Easy
15 min

jQuery CSS

Implement a $(selector).css() getter/setter that handles camelCase names, objects, automatic px units and removal.

JS Functions
Easy
15 min

JSON.parse (Lite)

Write a recursive-descent parser for JSON text that matches JSON.parse and throws SyntaxError on invalid input.

JS Functions
Hard
45 min

JSON.stringify

Reimplement JSON.stringify: escaping, undefined and function handling, toJSON, wrapper objects, cycles and BigInt errors.

JS Functions
Hard
40 min

List Format

Format a list of names into a readable sentence with options for sorting, de-duplication and an "and N others" cutoff.

JS Functions
Medium
20 min

LRU Cache

Implement a fixed-capacity cache that evicts the least recently used entry, with O(1) get and set.

JS Functions
Medium
25 min

Make Counter

Use a closure to build independent counters that remember their own state between calls.

JS Functions
Easy
10 min

Map Async

Map over a list with an async callback, running every call in parallel and keeping the results in input order.

JS Functions
Medium
15 min

Map Async with Limit

Map over a list with an async callback while never running more than a given number of calls at once.

JS Functions
Hard
30 min

Max By

Return the element whose iteratee value is largest, skipping elements that produce no comparable value.

JS Functions
Easy
10 min

Mean

Compute the arithmetic mean of an array of numbers, returning NaN for an empty array.

JS Functions
Easy
5 min

Memoize

Cache a function's results by argument so repeated calls with the same input skip the work.

JS Functions
Medium
15 min

Memoize II (multiple arguments)

Memoize a function of any number of arguments with a collision-free cache keyed on every argument.

JS Functions
Medium
25 min

Middlewares

Compose async middleware functions into one onion-style pipeline where each step can run code before and after next().

JS Functions
Medium
25 min

Min By

Return the element whose iteratee value is smallest, skipping elements that produce no comparable value.

JS Functions
Easy
10 min

new Operator

Re-implement the new operator: create the object, link the prototype, run the constructor.

JS Functions
Medium
15 min

Number of Arguments

Return how many arguments a function was called with, and explain arguments vs rest vs Function.length.

JS Functions
Easy
5 min

Object.create

Implement Object.create, including null prototypes and property descriptors.

JS Functions
Easy
10 min

Observable

Build a minimal Observable with subscribe, unsubscribe, teardown, of/from creators and pipeable map and filter operators.

JS Functions
Hard
40 min

Omit

Create a shallow copy of an object without the listed keys.

JS Functions
Medium
10 min

Once

Wrap a function so that it runs at most once and later calls return the first result.

JS Functions
Easy
10 min

Partial

Pre-fill some of a function's arguments, with placeholders for positions supplied later.

JS Functions
Medium
15 min

Pick

Create a new object containing only the listed keys of a source object.

JS Functions
Easy
10 min

Pipe

Chain functions left to right so data flows through them in reading order.

JS Functions
Easy
10 min

Promise.all

Implement Promise.all: resolve with every result in order, or reject on the first failure.

JS Functions
Medium
20 min

Promise.allSettled

Implement Promise.allSettled: wait for every input and report each outcome in order.

JS Functions
Medium
15 min

Promise.any

Implement Promise.any: fulfill with the first success, or reject with an AggregateError.

JS Functions
Medium
20 min

Promise Implementation

Build a Promises/A+-style MyPromise with then, catch, finally, chaining and thenable adoption.

JS Functions
Hard
45 min

Promise Pool

Build a concurrency-limited task queue: tasks can be added at any time and at most N run at once.

JS Functions
Hard
30 min

Promise.race

Implement Promise.race: settle the same way as the first input to settle.

JS Functions
Easy
10 min

Promise.reject

Implement Promise.reject and explain why it never unwraps promises or thenables.

JS Functions
Easy
5 min

Promise.resolve

Implement Promise.resolve, including promise pass-through and thenable adoption.

JS Functions
Medium
15 min

Promise Timeout

Wrap a promise so it rejects with a TimeoutError if it doesn't settle in time, without leaking timers.

JS Functions
Medium
15 min

Promise.withResolvers

Implement Promise.withResolvers to create a promise you can settle from outside its executor.

JS Functions
Easy
10 min

Promisify

Convert a Node-style callback function into one that returns a promise.

JS Functions
Medium
15 min

Promisify II

Extend promisify with a custom-implementation symbol, like Node's util.promisify.custom.

JS Functions
Medium
20 min

Pub/Sub Store (Mini Redux)

Implement createStore with getState, dispatch and subscribe: the core of Redux in about 50 lines.

JS Functions
Medium
25 min

Range

Generate an array of numbers from start up to, but not including, end with an optional step.

JS Functions
Easy
10 min

Range Right

Generate the same numbers as range(start, end, step) but in descending order of generation.

JS Functions
Easy
10 min

Retry with Backoff

Retry a failing async operation with exponential backoff and a predicate that decides which errors are worth retrying.

JS Functions
Medium
20 min

Run Async Tasks in Series

Run a list of async functions one after another, passing each result to the next and stopping at the first failure.

JS Functions
Medium
15 min

Set

Write a value at a nested path, creating missing objects and arrays along the way.

JS Functions
Medium
25 min

setInterval with setTimeout

Re-implement setInterval and clearInterval using only chained setTimeout calls.

JS Functions
Medium
20 min

Signals (Fine-Grained Reactivity)

Implement createSignal, createEffect, createMemo, batch and untrack with automatic dependency tracking and glitch-free updates.

JS Functions
Hard
60 min

Size

Return the size of a collection: length for arrays and strings, size for Map and Set, key count for objects.

JS Functions
Easy
10 min

Sleep

Write a promise-based sleep(ms) and explain why it pauses an async function but not the thread.

JS Functions
Easy
5 min

Spreadsheet Evaluator

Build a spreadsheet engine: parse cell formulas, evaluate references and ranges, recompute dependents on change and detect cycles.

JS Functions
Hard
60 min

Squash Object

Flatten a nested object into a single level whose keys are dot-separated paths.

JS Functions
Medium
20 min

String Repeat and Pad

Implement repeat, padStart and padEnd without the built-in string methods, matching their edge-case behaviour.

JS Functions
Easy
15 min

Table of Contents

Build a nested table of contents from the h1–h6 headings in a document, generating unique anchor ids and rendering it as nested lists.

JS Functions
Hard
35 min

Template Engine

Build a {{ }} interpolation engine with dotted paths, HTML escaping, raw {{{ }}} output, filters and a compile step.

JS Functions
Medium
30 min

Text Search Highlight

Wrap every case-insensitive match of the query words in <b> tags, merging overlapping and adjacent matches.

JS Functions
Medium
25 min

Throttle

Limit a function to at most one call per wait window, with leading and trailing calls.

JS Functions
Medium
20 min

Type Utilities

Write reliable checks for JavaScript's primitive types, including the null and boxed-value traps.

JS Functions
Easy
15 min

Type Utilities II

Write type checks for non-primitive values: arrays, functions, objects and plain objects.

JS Functions
Medium
15 min

Undo/Redo History

Implement an undoable value with past and future stacks, redo invalidation, no-op detection and a bounded history size.

JS Functions
Medium
20 min

Union By

Merge several arrays into one list of unique elements, where uniqueness is decided by an iteratee.

JS Functions
Medium
15 min

Unique Array

Remove duplicate values from an array while keeping the first occurrence of each, in order.

JS Functions
Easy
10 min

Query String Parse and Stringify

Parse a URL query string into an object (with repeated keys as arrays) and serialise it back, handling encoding, + as space and malformed input.

JS Functions
Medium
25 min

Virtual DOM Diff (Keyed Children)

Patch the real DOM from an old and a new virtual tree, reusing nodes by type and key and moving keyed children instead of recreating them.

JS Functions
Hard
50 min

Virtual DOM: createElement and render

Implement h() to build virtual DOM nodes and render() to turn them into real DOM, with attributes, styles, events and function components.

JS Functions
Hard
35 min

How do you abort a web request using `AbortController` in JavaScript?

Cancelling fetch with signals, timeouts, AbortSignal.any and cleaning up in effects.

Quiz · JavaScript
Medium
6 min

How do you add, remove, and modify HTML elements using JavaScript?

createElement, append, replaceWith, remove, classList, fragments, templates and avoiding innerHTML XSS.

Quiz · JavaScript
Easy
6 min

Are you familiar with styling SVG?

Yes, there are several ways to color shapes (including specifying attributes on the object) using inline CSS, an embedded CSS section, or an external CSS file.

Quiz · CSS
Medium
3 min

How do ARIA live regions work, and how do you announce dynamic updates reliably?

polite vs assertive, status and alert roles, aria-atomic, timing pitfalls and an announcer pattern.

Quiz · HTML
Medium
7 min

What is the consequence of using array indices as the value for `key`s in React?

Why index keys move state and DOM to the wrong rows, and when they are safe.

Quiz · React
Medium
6 min

What is async/await and how does it simplify asynchronous code?

Syntax over promises: sequential vs parallel awaits, error handling, top-level await and pitfalls.

Quiz · JavaScript
Medium
7 min

How do you handle asynchronous data loading in React applications?

Server Components and loaders, query libraries, careful effects, Suspense and use().

Quiz · React
Medium
8 min

What is the back/forward cache (bfcache), and what makes a page ineligible for it?

Instant back navigations, pageshow/pagehide, unload and other blockers, and how to test eligibility.

Quiz · Performance
Medium
7 min

What are the benefits of using currying and partial application?

Reuse, configuration, composition and point-free pipelines, plus the costs.

Quiz · JavaScript
Medium
5 min

What are the benefits of using hooks in React?

Reusable stateful logic, co-location by concern, and no classes.

Quiz · React
Easy
5 min

Explain the concept of a callback function in asynchronous operations

Passing functions to be called later, error-first callbacks, callback hell and inversion of control.

Quiz · JavaScript
Easy
5 min

Can you describe the main difference between a .forEach loop and a .map() loop and why you would pick one versus the other?

To understand the differences between the two, let's look at what each function does.

Quiz · JavaScript
Medium
3 min

Can you explain the difference between coding a website to be responsive versus using a mobile-first strategy?

Note that these two approaches are not exclusive.

Quiz · CSS
Medium
3 min

Can you give an example for destructuring an object or an array?

Destructuring is an expression available in ES6 which enables a succinct and convenient way to extract values of Objects or Arrays and place them into distinct

Quiz · JavaScript
Medium
3 min

Can you give an example of a curry function and why this syntax offers an advantage?

Currying is a pattern where a function with more than one parameter is broken into multiple functions that, when called in series, will accumulate all of the re

Quiz · JavaScript
Medium
3 min

Can you give an example of an @media property other than screen?

Yes, there are four types of @media properties (including screen):

Quiz · CSS
Medium
3 min

Can you offer a use case for the new arrow => function syntax? How does this new syntax differ from other functions?

One obvious benefit of arrow functions is to simplify the syntax needed to create functions, without a need for the function keyword. The this within arrow func

Quiz · JavaScript
Medium
3 min

How do you reliably determine whether an object is empty?

Own keys vs enumerable keys, symbols, prototypes, null and non-plain objects.

Quiz · JavaScript
Easy
4 min

Explain the difference between classical inheritance and prototypal inheritance

Blueprint-copying classes vs live delegation to objects, and where JS classes fit.

Quiz · JavaScript
Easy
5 min

What is clickjacking, and how do you defend against it?

UI redressing via invisible iframes, frame-ancestors vs X-Frame-Options, and legitimate embedding.

Quiz · Security
Medium
6 min

How can closures be used to create private variables?

The module/factory pattern for encapsulation, and how it compares to #private class fields.

Quiz · JavaScript
Easy
5 min

Explain the concept of code coverage and how it can be used to assess test quality

Line, branch and function coverage, what they miss, and mutation testing.

Quiz · JavaScript
Medium
5 min

What is code splitting in a React application?

Dynamic import, lazy and Suspense, route-level splitting and prefetching.

Quiz · React
Medium
6 min

How do you decide where to code-split a large front-end app, and what can go wrong?

Route, component and vendor splitting, request waterfalls, chunk granularity and caching trade-offs.

Quiz · Performance
Medium
9 min

What is the Command pattern and how is it used?

Encapsulating actions as objects for undo/redo, queues, macros and keyboard shortcuts.

Quiz · JavaScript
Medium
6 min

What are some common security headers and their purpose?

CSP, HSTS, X-Content-Type-Options, Referrer-Policy, Permissions-Policy, COOP and friends.

Quiz · Security
Medium
7 min

What are the common pitfalls of using the `this` keyword?

Lost receivers, callbacks, nested functions, arrow methods on objects and class field trade-offs.

Quiz · JavaScript
Easy
5 min

Explain the differences between CommonJS modules and ES modules in JavaScript

Static imports vs runtime require, live bindings, loading semantics, tree-shaking and interop in Node.

Quiz · JavaScript
Medium
8 min

Consider HTML5 as an open web platform. What are the building blocks of HTML5?

- Semantics - Allowing you to describe more precisely what your content is.

Quiz · HTML
Medium
3 min

How do you validate form elements using the Constraint Validation API?

Native form validation with ValidityState, setCustomValidity and accessible custom error UI.

Quiz · Web & Browser
Hard
8 min

How would you design and roll out a Content Security Policy for an existing production app?

Strict nonce-based CSP, strict-dynamic, report-only rollout, reporting, and the directives that matter.

Quiz · Security
Hard
11 min

How do content-visibility and CSS containment improve rendering performance, and what can go wrong?

contain values, content-visibility: auto, contain-intrinsic-size, and effects on scrollbars, find-in-page and a11y.

Quiz · CSS
Hard
8 min

What is the difference between controlled and uncontrolled React components?

Who owns the value, React state or the DOM, and the trade-offs of each.

Quiz · React
Easy
6 min

How do you convert a Set to an array in JavaScript?

Spread, Array.from and when you might not need to convert at all.

Quiz · JavaScript
Easy
4 min

What are the Core Web Vitals today, how are they measured, and what are the thresholds?

LCP, INP and CLS: what each one captures, the p75 thresholds, and lab vs field data.

Quiz · Performance
Medium
8 min

When does the browser send a CORS preflight, and how do credentialed cross-origin requests work?

Simple vs preflighted requests, the response headers involved, credentials mode, caching preflights and debugging.

Quiz · Web & Browser
Medium
9 min

What are the most common misconceptions about CORS as a security mechanism?

Why CORS relaxes rather than adds protection, origin reflection bugs, null origins and what actually protects APIs.

Quiz · Security
Hard
9 min

Create a for loop that iterates up to 100 while outputting **"fizz"** at multiples of 3, **"buzz"** at multiples of 5 and **"fizzbuzz"** at multiples of 3 and 5.

Check out this version of FizzBuzz by Paul Irish.

Quiz · JavaScript
Medium
3 min

Walk through the critical rendering path. What blocks rendering, and how do you shorten it?

HTML parsing, CSSOM, render-blocking vs parser-blocking resources, the preload scanner and first paint.

Quiz · Web & Browser
Medium
9 min

Compare CSR, SSR, SSG, ISR and streaming SSR. How do you choose a rendering strategy per page?

Trade-offs in TTFB, LCP, INP, freshness, cost and complexity, with a per-route decision framework.

Quiz · Web & Browser
Hard
11 min

What is CSRF, and is SameSite=Lax enough to prevent it in 2025?

How CSRF works, SameSite modes and browser defaults, same-site vs same-origin, and layered defences.

Quiz · Security
Hard
10 min

What are CSS cascade layers (@layer), and how would you use them to tame specificity in a large codebase?

Layer order vs specificity, unlayered styles, !important inversion, and layering resets, libraries and utilities.

Quiz · CSS
Hard
8 min

What are CSS container queries, and how do they change component design compared with media queries?

container-type, named containers, container query units, style queries and the containment trade-offs.

Quiz · CSS
Medium
8 min

How do CSS custom properties differ from Sass/Less variables, and how would you use them for theming?

Runtime vs compile-time, inheritance and scoping, @property typing, fallbacks and design-token architecture.

Quiz · CSS
Medium
8 min

What does the CSS :has() selector enable, and what are its performance and specificity gotchas?

The "parent selector", state-driven styling without JS, quantity queries, specificity and invalidation cost.

Quiz · CSS
Medium
7 min

What are CSS logical properties, and why do they matter for internationalised products?

Inline/block axes, writing modes, RTL support without overrides, and migration strategy.

Quiz · CSS
Easy
6 min

Provide some examples of how currying and partial application can be used

Practical uses: event handlers, loggers, validators, API clients and pipelines.

Quiz · JavaScript
Easy
6 min

How do currying and partial application differ from each other?

Unary chains versus fixing some arguments once, with implementations of both.

Quiz · JavaScript
Medium
5 min

How can you create custom error objects?

Subclassing Error with name, code and cause, and the instanceof caveats.

Quiz · JavaScript
Medium
6 min

Explain the concept of debouncing and throttling

Run after activity stops versus at most once per interval, with implementations and use cases.

Quiz · Performance
Easy
6 min

How do you debug React applications?

DevTools, the Profiler, Strict Mode, lint rules and production error reporting.

Quiz · React
Medium
7 min

What is the Decorator pattern and how is it used?

Wrapping objects or functions to add behaviour, including higher-order functions and TC39 decorators.

Quiz · JavaScript
Medium
6 min

Describe Block Formatting Context (BFC) and how it works.

A Block Formatting Context (BFC) is part of the visual CSS rendering of a web page in which block boxes are laid out. Floats, absolutely positioned elements, in

Quiz · CSS
Medium
3 min

Describe event bubbling.

When an event triggers on a DOM element, it will attempt to handle the event if there is a listener attached, then the event is bubbled up to its parent and the

Quiz · JavaScript
Medium
3 min

Describe event capturing in JavaScript and browsers

The top-down phase of DOM event propagation and when listening in it is useful.

Quiz · JavaScript
Easy
5 min

Describe floats and how they work.

Float is a CSS positioning property. Floated elements remain a part of the flow of the page, and will affect the positioning of other elements (e.g. text will f

Quiz · CSS
Medium
3 min

Describe pseudo-elements and discuss what they are used for.

A CSS pseudo-element is a keyword added to a selector that lets you style a specific part of the selected element(s). They can be used for decoration (:first-li

Quiz · CSS
Medium
3 min

Describe the difference between a cookie, sessionStorage and localStorage.

All the above-mentioned technologies are key-value storage mechanisms on the client side. They are only able to store values as strings.

Quiz · HTML
Medium
3 min

Describe the difference between <script>, <script async> and <script defer>.

- <script - HTML parsing is blocked, the script is fetched and executed immediately, HTML parsing resumes after the script is executed.

Quiz · HTML
Medium
3 min

Describe what you like and dislike about the CSS preprocessors you have used.

- Mostly the advantages mentioned above.

Quiz · CSS
Medium
3 min

Describe z-index and how stacking context is formed.

The z-index property in CSS controls the vertical stacking order of elements that overlap. z-index only affects elements that have a position value which is not

Quiz · CSS
Medium
3 min

What are design patterns and why are they useful?

Reusable solutions to recurring design problems and a shared vocabulary for teams.

Quiz · JavaScript
Easy
5 min

How do you detect if JavaScript is disabled on a page?

noscript, the no-js class swap, the scripting media feature, and progressive enhancement.

Quiz · Web & Browser
Medium
4 min

Difference between document load event and document DOMContentLoaded event?

The DOMContentLoaded event is fired when the initial HTML document has been completely loaded and parsed, without waiting for stylesheets, images, and subframes

Quiz · JavaScript
Medium
3 min

Difference between: function Person(){}, var person = Person(), and var person = new Person()?

This question is pretty vague. My best guess at its intention is that it is asking about constructors in JavaScript. Technically speaking, function Person(){} i

Quiz · JavaScript
Medium
3 min

How do you handle errors in asynchronous operations?

try/catch with await, .catch, unhandled rejections, fetch HTTP errors, aggregation and retries.

Quiz · JavaScript
Easy
7 min

Explain the concept of error propagation in JavaScript

How errors unwind the call stack, flow through promise chains and reach global handlers.

Quiz · JavaScript
Medium
6 min

ES6 Template Literals offer a lot of flexibility in generating strings, can you give an example?

Template literals help make it simple to do string interpolation, or to include variables in a string. Before ES2015, it was common to do something like this:

Quiz · JavaScript
Medium
3 min

What are event listeners and how are they used?

addEventListener options (capture, once, passive, signal), removal and memory hygiene.

Quiz · JavaScript
Easy
5 min

Explain the event phases in a browser

Capture, target and bubble phases, eventPhase values, and how shadow DOM retargeting fits in.

Quiz · JavaScript
Medium
6 min

Explain Ajax in as much detail as possible.

Ajax (asynchronous JavaScript and XML) is a set of web development techniques using many web technologies on the client side to create asynchronous web applicat

Quiz · JavaScript
Medium
3 min

Explain CSS sprites, and how you would implement them on a page or site.

CSS sprites combine multiple images into one single larger image. It is a commonly-used technique for icons (Gmail uses it). How to implement it:

Quiz · CSS
Medium
3 min

Explain event delegation

Event delegation is a technique involving adding event listeners to a parent element instead of adding them to the descendant elements. The listener will fire w

Quiz · JavaScript
Medium
3 min

What is the event loop? Explain the difference between the macrotask and microtask queues.

How JavaScript schedules callbacks, promises and rendering on a single thread.

Quiz · JavaScript
Medium
8 min

Explain Function.prototype.bind.

The bind() method creates a new function that, when called, has its this keyword set to the provided value, with a given sequence of arguments preceding any pro

Quiz · JavaScript
Medium
3 min

Explain "hoisting".

Hoisting is a term used to explain the behavior of variable declarations in your code. Variables declared or initialized with the var keyword will have their de

Quiz · JavaScript
Medium
3 min

Explain how a browser determines what elements match a CSS selector.

This part is related to the above about writing efficient CSS(what-are-some-of-the-gotchas-for-writing-efficient-css). Browsers match selectors from rightmost (

Quiz · CSS
Medium
3 min

Explain how JSONP works (and how it's not really Ajax).

JSONP (JSON with Padding) is a method commonly used to bypass the cross-domain policies in web browsers because Ajax requests from the current page to a cross-o

Quiz · JavaScript
Medium
3 min

Explain how prototypal inheritance works

All JavaScript objects have a proto property with the exception of objects created with Object.create(null), that is a reference to another object, which is cal

Quiz · JavaScript
Medium
3 min

Explain how this works in JavaScript

There's no simple explanation for this; it is one of the most confusing concepts in JavaScript. A hand-wavey explanation is that the value of this depends on ho

Quiz · JavaScript
Medium
3 min

Explain the difference between mutable and immutable objects.

Immutability is a core principle in functional programming, and has lots to offer to object-oriented programs as well. A mutable object is an object whose state

Quiz · JavaScript
Medium
7 min

Explain the difference between synchronous and asynchronous functions.

Synchronous functions are blocking while asynchronous functions are not. In synchronous functions, statements complete before the next statement is run. In this

Quiz · JavaScript
Medium
3 min

Explain the differences on the usage of foo between function foo() {} and var foo = function() {}

The former is a function declaration while the latter is a function expression. The key difference is that function declarations have its body hoisted but the b

Quiz · JavaScript
Medium
3 min

Explain the same-origin policy with regards to JavaScript.

The same-origin policy restricts how a document or script from one origin can interact with resources from another origin. Two URLs have the same origin when th

Quiz · JavaScript
Medium
3 min

Explain what a single page app is and how to make one SEO-friendly.

The below is taken from the awesome Grab Front End Guide, which coincidentally, is written by me!

Quiz · JavaScript
Medium
4 min

Explain why the following doesn't work as an IIFE: function foo(){ }();. What needs to be changed to properly make it an IIFE?

IIFE stands for Immediately Invoked Function Expressions. The JavaScript parser reads function foo(){ }(); as function foo(){ } and ();, where the former is a f

Quiz · JavaScript
Medium
3 min

Explain your understanding of the box model and how you would tell the browser in CSS to render your layout in different box models.

The CSS box model describes the rectangular boxes that are generated for elements in the document tree and laid out according to the visual formatting model. Ea

Quiz · CSS
Medium
3 min

What is the Factory pattern and how is it used?

Creating objects through a function that hides construction details.

Quiz · JavaScript
Medium
5 min

How do browsers prioritise resource loading, and when should you use the fetchpriority attribute?

Default priorities by resource type, fetchpriority high/low/auto, interaction with lazy loading and preload.

Quiz · HTML
Medium
7 min

What is the first rule of ARIA, and what are the most common ARIA mistakes you see in code reviews?

Native first, ARIA changes semantics not behaviour, and the recurring misuse patterns in component libraries.

Quiz · HTML
Medium
8 min

How do you decide between Flexbox and Grid, and what problem does subgrid solve?

Content-out vs layout-in thinking, intrinsic sizing, auto-fit/minmax, subgrid alignment and accessibility of visual reordering.

Quiz · CSS
Medium
8 min

How do you build fluid typography and spacing with clamp(), and what are the accessibility pitfalls?

Deriving the preferred value, rem + vw mixing for zoom, container units, and WCAG resize requirements.

Quiz · CSS
Medium
7 min

What is the Flux pattern and what are its benefits?

Unidirectional actions, dispatcher and stores, and how Redux evolved from it.

Quiz · React
Medium
6 min

How do you handle errors using try...catch blocks?

How try/catch works with sync and async code, and how to catch errors usefully.

Quiz · JavaScript
Easy
5 min

What are some best practices for handling sensitive data in JavaScript?

What never belongs in the client, token storage, transport, logging and memory hygiene.

Quiz · Security
Medium
7 min

Have you ever used a grid system, and if so, what do you prefer?

Before Flex became popular (around 2014), the float-based grid system was the most reliable because it still has the most browser support among the alternative

Quiz · CSS
Medium
3 min

Have you ever used JavaScript templating? If so, what libraries have you used?

Yes. Handlebars, Underscore, Lodash, AngularJS, and JSX. I disliked templating in AngularJS because it made heavy use of strings in the directives and typos wou

Quiz · JavaScript
Medium
3 min

Have you ever worked with retina graphics? If so, when and what techniques did you use?

Retina is just a marketing term to refer to high resolution screens with a pixel ratio bigger than 1. The key thing to know is that using a pixel ratio means th

Quiz · CSS
Medium
3 min

Have you played around with the new CSS Flexbox or Grid specs?

Yes. Flexbox is mainly meant for 1-dimensional layouts while Grid is meant for 2-dimensional layouts.

Quiz · CSS
Medium
3 min

Have you used different HTML templating languages before?

Yes, Pug (formerly Jade), ERB, Slim, Handlebars, Jinja, Liquid, and EJS just to name a few. In my opinion, they are more or less the same and provide similar fu

Quiz · HTML
Medium
3 min

Have you used or implemented media queries or mobile-specific layouts/CSS?

Yes. An example would be transforming a stacked pill navigation into a fixed-bottom tab navigation beyond a certain breakpoint.

Quiz · CSS
Medium
3 min

How can you share code between files?

This depends on the JavaScript environment.

Quiz · JavaScript
Medium
3 min

How do you organize your code? (module pattern, classical inheritance?)

In the past, I've used Backbone for my models which encourages a more OOP approach, creating Backbone models and attaching methods to them.

Quiz · JavaScript
Medium
3 min

How do you serve a page with content in multiple languages?

I will assume that it is asking about the most common case, which is how to serve a page with content available in multiple languages, but the content within th

Quiz · HTML
Medium
3 min

How do you serve your pages for feature-constrained browsers? What techniques/processes do you use?

- Graceful degradation - The practice of building an application for modern browsers while ensuring it remains functional in older browsers.

Quiz · CSS
Medium
3 min

How does JavaScript garbage collection work?

Reachability, mark-and-sweep, generational collection and how front-end apps leak memory.

Quiz · JavaScript
Hard
7 min

How is responsive design different from adaptive design?

Both responsive and adaptive design attempt to optimize the user experience across different devices, adjusting for different viewport sizes, resolutions, usage

Quiz · CSS
Medium
3 min

How do you create a constructor function?

Writing a constructor, putting methods on the prototype, guarding against missing new, and the class equivalent.

Quiz · JavaScript
Easy
4 min

What causes Cumulative Layout Shift (CLS) and how do you fix it?

Session windows, the usual culprits (images, ads, fonts, injected banners) and how to debug shifts.

Quiz · Performance
Medium
8 min

How do you find and fix a poor INP (Interaction to Next Paint)?

Input delay, processing time and presentation delay: finding the slow interaction and fixing each phase.

Quiz · Performance
Hard
10 min

Your field LCP is 4.1 s on mobile. How do you diagnose and improve it?

Breaking LCP into TTFB, resource load delay, load duration and render delay, and fixing each part.

Quiz · Performance
Hard
10 min

How does virtual DOM in React work? What are its benefits and downsides?

Render, diff with type and key heuristics, commit, and the costs of doing so.

Quiz · React
Medium
7 min

How would you approach fixing browser-specific styling issues?

- After identifying the issue and the offending browser, use a separate style sheet that only loads when that specific browser is being used. This technique req

Quiz · CSS
Medium
3 min

How would you implement a web design comp that uses non-standard fonts?

Use @font-face and define font-family for different font-weights.

Quiz · CSS
Medium
3 min

How does the native <dialog> element work, and what does showModal() give you over a custom modal?

Top layer, inertness, focus handling, Escape, ::backdrop, form method=dialog and remaining gaps.

Quiz · HTML
Medium
8 min

Design an HTTP caching strategy for a web app: Cache-Control, ETag and stale-while-revalidate.

Immutable hashed assets, revalidated HTML, CDN vs browser caches, validators and common caching incidents.

Quiz · Web & Browser
Hard
10 min

How do you make an HTTP request using the Fetch API?

GET and POST with fetch, checking response.ok, timeouts and cancellation.

Quiz · JavaScript
Easy
6 min

What changed from HTTP/1.1 to HTTP/2 to HTTP/3, and what does it mean for front-end delivery?

Multiplexing, HPACK/QPACK, head-of-line blocking, QUIC over UDP, and which old optimisations are now harmful.

Quiz · Web & Browser
Medium
9 min

How do iframes on a page communicate?

Cross-origin messaging with postMessage, origin checks and MessageChannel.

Quiz · Web & Browser
Medium
7 min

How do you safely embed untrusted content with iframe sandboxing?

sandbox tokens, the allow-scripts + allow-same-origin trap, separate origins, allow (Permissions Policy) and srcdoc.

Quiz · Security
Hard
8 min

How would you set up image optimisation for a large, image-heavy site?

Formats, responsive images, lazy loading, priority hints, image CDNs and governance at scale.

Quiz · Performance
Medium
9 min

How do you import and export modules in JavaScript?

Named, default, namespace, re-export and dynamic imports, and live bindings.

Quiz · JavaScript
Easy
5 min

What does the inert attribute do, and when would you use it instead of aria-hidden or tabindex=-1?

Removing subtrees from focus, interaction and the accessibility tree in one attribute, with real use cases.

Quiz · HTML
Medium
6 min

Explain the concept of inheritance in ES2015 classes

extends, super, constructor rules, method overriding, statics and private fields in subclasses.

Quiz · JavaScript
Easy
6 min

What is the difference between innerHTML and textContent?

How markup parsing, text nodes and innerText differ, and why textContent is the safe default.

Quiz · JavaScript
Medium
5 min

Explain the concept of input validation and its importance in security

Server-side allowlist validation with schemas, versus output encoding, and why client checks are UX only.

Quiz · Security
Medium
6 min

Compare IntersectionObserver, ResizeObserver and MutationObserver. When would you use each?

What each observer watches, when callbacks run, performance characteristics and common pitfalls.

Quiz · Web & Browser
Medium
8 min

What is the Intl namespace object for?

Locale-aware formatting of numbers, dates, plurals, lists, collation and segmentation.

Quiz · JavaScript
Medium
6 min

Is there any reason you'd want to use translate() instead of absolute positioning, or vice-versa? And why?

translate() is a value of CSS transform. Changing transform or opacity does not trigger browser reflow or repaint but does trigger compositions; whereas changin

Quiz · CSS
Medium
3 min

What is islands architecture, and how does it compare with full hydration and React Server Components?

Static HTML with isolated interactive islands, hydration directives, resumability, and when islands fit.

Quiz · Web & Browser
Hard
9 min

What are iterators and generators in JavaScript and what are they used for?

The iteration protocols, function*, lazy sequences, async iteration and iterator helpers.

Quiz · JavaScript
Hard
8 min

What are the various data types in JavaScript?

The seven primitives plus objects, typeof quirks, and value vs reference semantics.

Quiz · JavaScript
Easy
5 min

What are the different types of errors in JavaScript?

Built-in Error subclasses, DOMException, and useful ways to categorise failures.

Quiz · JavaScript
Medium
5 min

What are modules and why are they useful?

Scope isolation, explicit dependencies, tree shaking and code splitting with ES modules.

Quiz · JavaScript
Easy
5 min

What are some common performance bottlenecks in JavaScript applications?

Large bundles, long tasks, layout thrashing, memory leaks, network waterfalls and over-rendering.

Quiz · Performance
Medium
7 min

What are some tools that can be used to measure and analyze JavaScript performance?

DevTools Performance panel, Lighthouse, RUM with web-vitals, bundle analysers and profilers.

Quiz · Performance
Hard
6 min

What are some tools and techniques for identifying security vulnerabilities in JavaScript code?

Dependency audits, SAST, secret scanning, DAST, CSP reporting and code review in CI.

Quiz · Security
Medium
6 min

What are some tools that can be used for JavaScript testing?

The wider testing toolbox: runners, DOM utilities, mocking, browsers, visual, a11y and static checks.

Quiz · JavaScript
Easy
5 min

Explain the concept of lazy loading and how it can improve performance

Deferring images, iframes, code and data until needed, and when not to.

Quiz · Performance
Easy
5 min

Explain the concept of lexical scoping

Scope decided by where code is written, the scope chain, and how it enables closures.

Quiz · JavaScript
Easy
5 min

When should you virtualise a long list, how does it work, and what does it cost you?

Windowing mechanics, variable heights, accessibility and find-in-page trade-offs, and alternatives like content-visibility.

Quiz · Performance
Medium
8 min

How do you localize React applications?

Message catalogs, ICU MessageFormat, Intl, locale routing, RTL and translation workflow.

Quiz · React
Medium
7 min

What is a long task, and what are the ways to break one up and yield to the main thread?

The 50 ms rule, setTimeout vs scheduler.yield vs postTask, isInputPending, Workers and the LoAF API.

Quiz · Performance
Hard
10 min

What are some best practices for writing maintainable and effective tests in JavaScript?

Behaviour-focused, deterministic, readable tests that survive refactors.

Quiz · JavaScript
Medium
6 min

Make this work:

Make this work:

Quiz · JavaScript
Medium
3 min

How do you manipulate CSS styles using JavaScript?

Classes, custom properties, inline styles, computed styles and constructable stylesheets.

Quiz · JavaScript
Easy
5 min

What are the differences between `Map`/`Set` and `WeakMap`/`WeakSet` in JavaScript?

Weakly held keys, garbage collection, non-iterability, and real use cases like caches and private data.

Quiz · JavaScript
Easy
6 min

What is the difference between a `Map` object and a plain object in JavaScript?

Key types, ordering, size, prototype pitfalls, performance and serialisation compared.

Quiz · JavaScript
Easy
5 min

How do memory leaks happen in long-lived SPAs, and how would you find one?

Detached DOM, forgotten listeners, timers, caches and closures, plus the heap-snapshot workflow.

Quiz · Performance
Hard
10 min

What are mocks and stubs and how are they used in testing?

Test doubles: stubs, mocks, spies and fakes, plus network mocking with MSW.

Quiz · JavaScript
Hard
6 min

What are the benefits of using a module bundler?

Graph resolution, transforms, minification, code splitting and cache-friendly output.

Quiz · Performance
Medium
6 min

What are the metadata fields of a module?

import.meta.url, import.meta.resolve, host-specific fields and package.json module metadata.

Quiz · JavaScript
Medium
5 min

What is the Module pattern and how does it help with encapsulation?

IIFE closures, revealing module, ES modules and private class fields for encapsulation.

Quiz · JavaScript
Medium
5 min

What is the difference between `mouseenter` and `mouseover` event in JavaScript and browsers?

Why mouseenter does not bubble or fire for children, and when each is the right choice.

Quiz · JavaScript
Easy
4 min

How do you reduce supply-chain risk from npm dependencies in a front-end codebase?

Typosquatting, compromised maintainers, install scripts, lockfiles, provenance and dependency governance.

Quiz · Security
Hard
10 min

What are JavaScript object getters and setters for?

Computed properties, validation and encapsulation with get/set, plus their performance and debugging trade-offs.

Quiz · JavaScript
Medium
5 min

What is `Object.preventExtensions()` for?

Blocking new properties, and how it compares to Object.seal and Object.freeze.

Quiz · JavaScript
Medium
4 min

Explain the Observer pattern and its use cases

Subjects notifying subscribers: event emitters, EventTarget, stores and their pitfalls.

Quiz · JavaScript
Medium
6 min

How can you optimize DOM manipulation for better performance?

Batching reads and writes, fragments, delegation, virtualization and content-visibility.

Quiz · Performance
Hard
7 min

How can you optimize network requests for better performance?

Fewer, smaller, earlier, cached and prioritised requests.

Quiz · Performance
Hard
7 min

How would you optimize the performance of React contexts to reduce rerenders?

Stable values, split contexts, state/dispatch separation and selector-based stores.

Quiz · React
Hard
8 min

Other Answers

- https://github.com/sudheerj/javascript-interview-questions

Quiz · JavaScript
Medium
3 min

Explain the concept of partial application

Fixing some arguments of a function up front to create a more specific function.

Quiz · JavaScript
Medium
5 min

What are the potential pitfalls of using closures?

Loop capture bugs, stale closures in React, retained memory and per-instance function costs.

Quiz · JavaScript
Medium
6 min

What is the Popover API, and when do you use popover instead of a <dialog> or a custom dropdown?

popover=auto/manual, popovertarget, light dismiss, top layer, anchor positioning and accessibility gaps.

Quiz · HTML
Medium
7 min

What are some popular JavaScript testing frameworks?

Vitest, Jest, node:test, Testing Library, Playwright, Cypress and how they fit together.

Quiz · JavaScript
Easy
5 min

Explain preload, prefetch, preconnect, dns-prefetch and modulepreload. When does each help or hurt?

Resource hints, speculation rules and 103 Early Hints, with the costs of over-hinting.

Quiz · Performance
Medium
9 min

Explain the presentational vs container component pattern in React

Separating logic from view, and how hooks and headless libraries changed it.

Quiz · React
Easy
5 min

How do you prevent the default behavior of an event?

preventDefault, cancelable events, passive listeners and when not to block defaults.

Quiz · JavaScript
Easy
4 min

What is the difference between `event.preventDefault()` and `event.stopPropagation()`?

Cancelling the browser action vs stopping the event travelling, plus stopImmediatePropagation.

Quiz · JavaScript
Medium
5 min

How can you prevent SQL injection vulnerabilities in JavaScript applications?

Parameterized queries, ORMs, query builders and least privilege on the Node.js side.

Quiz · Security
Medium
6 min

What are Progressive Web Applications (PWAs)?

Installable, offline-capable web apps built on a manifest, service worker and HTTPS.

Quiz · Web & Browser
Medium
7 min

How is `Promise.all()` different from `Promise.allSettled()`?

Fail-fast vs wait-for-everything, result shapes, and where any and race fit in.

Quiz · JavaScript
Medium
5 min

Explain the different states of a Promise

Pending, fulfilled and rejected, what settled and resolved really mean, and why state is immutable.

Quiz · JavaScript
Medium
5 min

What are JavaScript object property flags and descriptors?

writable, enumerable, configurable, accessor descriptors and how freeze/seal build on them.

Quiz · JavaScript
Hard
7 min

Explain the concept of the Prototype pattern

Creating objects from existing ones: Object.create, prototype sharing and cloning.

Quiz · JavaScript
Easy
5 min

What is the purpose of the finally block?

Cleanup that runs on every exit path, Promise.finally, override gotchas and using declarations.

Quiz · JavaScript
Easy
4 min

What is the purpose of the `key` prop in React?

Keys give list items stable identity for reconciliation and state.

Quiz · React
Easy
5 min

What is the purpose of the `new` keyword?

The four steps new performs, return-value rules, new.target and what cannot be constructed.

Quiz · JavaScript
Easy
5 min

Explain the difference between `document.querySelector()` and `document.getElementById()`

Selector power vs a direct id lookup, scoping, live vs static collections and escaping.

Quiz · JavaScript
Easy
4 min

What are Actions in React 19? Explain `useActionState` and `useFormStatus`

Async transitions for mutations with built-in pending, error and form-reset handling.

Quiz · React
Medium
9 min

How has error handling changed in React 19?

Root error callbacks, de-duplicated logging, Action errors and boundaries.

Quiz · React
Medium
7 min

How do refs work as a prop in React 19, and what are ref cleanup functions?

ref as a regular prop, the end of forwardRef, and callback ref cleanups.

Quiz · React
Medium
6 min

What are some React anti-patterns?

Derived state, effect chains, nested component definitions, mutation and more.

Quiz · React
Medium
8 min

What is the React Compiler and how does it change memoization?

Build-time automatic memoization, its reliance on the Rules of React, and adoption.

Quiz · React
Medium
8 min

Explain the composition pattern in React

children, slots and compound components instead of inheritance and prop explosions.

Quiz · React
Medium
7 min

What are some pitfalls about using context in React?

Re-render cascades, unstable values, overuse and missing providers.

Quiz · React
Medium
7 min

What are some common pitfalls when doing data fetching in React?

Races, missing cleanup, waterfalls, missing caching and stale copies of server data.

Quiz · React
Medium
8 min

What are error boundaries in React for?

Containing render errors with fallback UI, what they miss, and React 19 changes.

Quiz · React
Medium
6 min

What is React Fiber and how is it an improvement over the previous approach?

Incremental, interruptible reconciliation with priorities, the basis of concurrent React.

Quiz · React
Hard
8 min

What is `forwardRef()` in React used for?

Passing refs through components, and why React 19 makes ref a regular prop.

Quiz · React
Medium
5 min

What are React Fragments used for?

Grouping children without extra DOM nodes, keyed fragments, and state preservation.

Quiz · React
Easy
4 min

What are higher-order components in React?

Component-in, component-out wrappers, their conventions, and why hooks replaced most of them.

Quiz · React
Medium
5 min

Explain what React hydration is

How React adopts server-rendered HTML and makes it interactive, and what changed in 18 and 19.

Quiz · React
Medium
7 min

What causes hydration mismatch errors in React and how do you fix them?

Non-deterministic render, client-only APIs, locale, invalid nesting, and the fixes.

Quiz · React
Medium
8 min

What is the difference between React Node, React Element, and a React Component?

Components produce elements; elements are one kind of renderable node.

Quiz · React
Medium
6 min

Explain one-way data flow of React and its benefits

Props down, events up, one owner per piece of state.

Quiz · React
Easy
5 min

What are React Portals used for?

Rendering into another DOM node while staying in the React tree for context and events.

Quiz · React
Medium
5 min

What is reconciliation in React?

How React decides which instances to keep, update or remount, based on type, position and key.

Quiz · React
Medium
7 min

What are render props in React and what are they for?

Function props that delegate rendering, and where they still beat hooks.

Quiz · React
Medium
5 min

What are React Server Components and how do they differ from SSR?

Server-only components that ship no JS, the use client boundary, and how RSC complements SSR.

Quiz · React
Hard
10 min

Explain server-side rendering of React applications and its benefits

Per-request HTML, hydration, streaming SSR and the trade-offs against CSR and SSG.

Quiz · React
Medium
8 min

How do you decide between using React state, context, and external state managers?

Classify state as server, URL, local or shared, then pick the simplest fitting tool.

Quiz · React
Hard
8 min

Explain static generation of React applications and its benefits

Build-time HTML on a CDN, its freshness limits, and ISR-style hybrids.

Quiz · React
Medium
6 min

How does streaming server-side rendering with Suspense work in React?

Shell first, boundaries streamed later, and selective hydration on the client.

Quiz · React
Hard
10 min

What is React Strict Mode and what are its benefits?

Development-only checks: double rendering, effect re-runs, ref checks and deprecation warnings.

Quiz · React
Medium
6 min

What is React Suspense and what does it enable?

Declarative loading boundaries for lazy code, data, streaming SSR and selective hydration.

Quiz · React
Medium
8 min

How does Suspense work for data fetching, and why doesn't it work with `useEffect`?

Suspense-enabled sources, render-as-you-fetch, and cached promises.

Quiz · React
Hard
9 min

What does the `use` API do in React 19 and how is it different from other hooks?

Reading promises and context during render, conditional calls, and the cached-promise rule.

Quiz · React
Medium
7 min

What is the `useCallback` hook in React and when should it be used?

Stable function identities, when they matter, and the React Compiler.

Quiz · React
Medium
6 min

What is the `useId` hook in React and when should it be used?

SSR-safe unique ids for accessibility attributes, and why not for keys.

Quiz · React
Easy
4 min

What is the `useMemo` hook in React and when should it be used?

Caching expensive calculations and stable identities, and when not to bother.

Quiz · React
Medium
6 min

How does `useOptimistic` work in React 19?

Optimistic overlays on real state during Actions, with automatic revert.

Quiz · React
Medium
7 min

What is the `useReducer` hook in React and when should it be used?

Centralized, testable state transitions with a pure reducer and stable dispatch.

Quiz · React
Medium
6 min

What is the `useRef` hook in React and when should it be used?

A persistent mutable box for DOM nodes and values that don't affect rendering.

Quiz · React
Easy
6 min

Explain `useTransition` and `useDeferredValue` and when to use each

Marking updates as non-urgent so concurrent React keeps input responsive.

Quiz · React
Hard
9 min

How do you get the query string values of the current page in JavaScript?

Reading and updating query parameters safely with URLSearchParams and URL.

Quiz · JavaScript
Easy
4 min

How would you build real-user performance monitoring (RUM) with PerformanceObserver?

Entry types, buffered observers, beaconing on visibilitychange, sampling, percentiles and segmentation.

Quiz · Performance
Hard
10 min

How do you redirect to a new page in JavaScript?

location.assign vs replace, router navigation, server redirects and open-redirect safety.

Quiz · Web & Browser
Easy
4 min

Explain reflow (layout), repaint and compositing. How do you avoid layout thrashing and janky animations?

Which CSS changes trigger which pipeline stages, forced synchronous layout, will-change and layer costs.

Quiz · Web & Browser
Medium
9 min

requestAnimationFrame vs requestIdleCallback vs setTimeout: when does each run and what is each for?

Frame-aligned visual work, idle-time background work, deadlines, throttling in background tabs and alternatives.

Quiz · Web & Browser
Medium
7 min

How do you reset a component's state in React?

State follows type plus position; change the key or reset explicitly.

Quiz · React
Medium
6 min

What are the rules of React hooks?

Top-level only, React functions only, why call order matters, and lint enforcement.

Quiz · React
Easy
6 min

Explain the concept of scope in JavaScript

Global, module, function and block scope, the scope chain, shadowing and the temporal dead zone.

Quiz · JavaScript
Easy
6 min

How can you implement secure authentication and authorization in JavaScript applications?

Session cookies vs tokens, OAuth/OIDC with PKCE, passkeys, and server-enforced authorization.

Quiz · Security
Hard
9 min

Why does semantic HTML matter, and how do landmark elements help assistive technology users?

Implicit roles, landmark navigation, headings, buttons vs links, and the cost of div soup.

Quiz · HTML
Easy
7 min

Explain the service worker lifecycle and caching strategies. How do you ship updates without breaking users?

install/waiting/activate, skipWaiting and clients.claim, cache-first vs network-first vs SWR, and update pitfalls.

Quiz · Web & Browser
Hard
11 min

How do Sets and Maps handle equality checks for objects?

SameValueZero and reference identity for object keys, and how to dedupe by value.

Quiz · JavaScript
Easy
5 min

What are Sets and Maps and how are they used?

Unique-value collections and keyed collections with any key type, plus new Set methods.

Quiz · JavaScript
Easy
5 min

What is the purpose of callback function argument format of `setState()` in React and when should it be used?

Updater functions compute next state from the latest queued state.

Quiz · React
Medium
6 min

What is the difference between `setTimeout()`, `setImmediate()`, and `process.nextTick()`?

Where each callback lands in the Node.js event loop, and the browser equivalents.

Quiz · JavaScript
Medium
6 min

Explain the concept of the Singleton pattern

One shared instance, why ES modules already give you one, and the testing downsides.

Quiz · JavaScript
Easy
5 min

How do source maps work, and should you ship them to production?

Mappings, sourcesContent, hidden source maps, uploading to error trackers, and the security trade-offs.

Quiz · Web & Browser
Medium
7 min

What is the difference between state and props in React?

Props are inputs owned by the parent; state is memory owned by the component.

Quiz · React
Easy
5 min

Explain the concept of the Strategy pattern

Swapping interchangeable algorithms behind one interface, often as a map of functions.

Quiz · JavaScript
Medium
5 min

Why do my effects run twice in development, and how should I fix it?

Strict Mode's mount-unmount-mount check and how to write symmetric cleanups.

Quiz · React
Easy
6 min

What is Subresource Integrity (SRI), and how do you manage the risk of third-party scripts?

Integrity hashes, crossorigin, why SRI doesn't fit evergreen tags, and isolation strategies for third parties.

Quiz · Security
Medium
8 min

Explain the concept of test-driven development (TDD)

Red-green-refactor, its benefits, costs and where it fits in front-end work.

Quiz · JavaScript
Medium
5 min

How can you test asynchronous code in JavaScript?

Awaiting promises, asserting rejections, fake timers and waiting for UI updates.

Quiz · JavaScript
Medium
6 min

How do you test React applications?

A layered strategy built on Testing Library, user-event, MSW and E2E tests.

Quiz · React
Medium
8 min

Explain the concept of `this` binding in event handlers

this as currentTarget in listeners, arrows and bind, removing bound listeners and handleEvent objects.

Quiz · JavaScript
Easy
5 min

Explain the concept of tree shaking in module bundling

Dead-code elimination of unused exports, side effects, and what defeats it.

Quiz · Performance
Medium
6 min

What are Trusted Types, and how do they help eliminate DOM-based XSS?

Locking down injection sinks with CSP require-trusted-types-for, policies, default policies and rollout.

Quiz · Security
Hard
9 min

What are the different types of testing in software development?

Functional and non-functional test types and how they fit a front-end strategy.

Quiz · JavaScript
Medium
6 min

What is the difference between `any`, `unknown` and `never` in TypeScript?

The escape hatch, the safe top type, and the empty bottom type.

Quiz · TypeScript
Easy
6 min

What does `as const` do in TypeScript?

Const assertions for literal, readonly types and deriving unions from values.

Quiz · TypeScript
Easy
5 min

What are assertion functions in TypeScript?

Functions that narrow by throwing: asserts condition and asserts value is T.

Quiz · TypeScript
Medium
6 min

What are branded (nominal) types in TypeScript and why use them?

Phantom brands that stop same-shape values being mixed up and mark validated data.

Quiz · TypeScript
Medium
6 min

How do access modifiers work in TypeScript classes, and how is `private` different from `#private`?

Compile-time vs runtime privacy, parameter properties, abstract and override.

Quiz · TypeScript
Medium
6 min

What are conditional types and the `infer` keyword in TypeScript?

Type-level branching, pattern matching with infer, and distribution over unions.

Quiz · TypeScript
Hard
9 min

What are `const` type parameters in TypeScript 5.0?

as const-style literal inference without caller ceremony.

Quiz · TypeScript
Medium
5 min

What are `.d.ts` declaration files and when do you write them?

Types-only files for JS code, assets and globals, and how packages ship types.

Quiz · TypeScript
Medium
7 min

What is declaration merging in TypeScript?

How interfaces, namespaces and enums merge, and how that powers global and module augmentation.

Quiz · TypeScript
Medium
6 min

How do decorators work in TypeScript, and how do standard decorators differ from experimental ones?

TS 5.0 standard decorators vs legacy experimentalDecorators, and their use cases.

Quiz · TypeScript
Hard
8 min

What are discriminated unions in TypeScript and how do you enforce exhaustive handling?

Tagged unions that make impossible states unrepresentable, checked with never.

Quiz · TypeScript
Medium
7 min

What are distributive conditional types in TypeScript?

How conditional types map over unions, how to disable it, and the never trap.

Quiz · TypeScript
Hard
7 min

Should you use enums or union literal types in TypeScript?

Runtime enums vs erasable unions, as const objects, and modern toolchain constraints.

Quiz · TypeScript
Medium
6 min

What are excess property checks in TypeScript and when do they apply?

Why fresh object literals reject unknown keys, and when the check doesn't fire.

Quiz · TypeScript
Medium
6 min

What are function overloads in TypeScript and when should you use them?

Multiple call signatures with one hidden implementation, and the alternatives.

Quiz · TypeScript
Medium
6 min

How do you write generic React components in TypeScript?

Type parameters that connect props, tsx syntax quirks, and wrappers that lose generics.

Quiz · TypeScript
Hard
8 min

Explain generics and generic constraints in TypeScript

Type parameters that preserve relationships, constraints, defaults, const and NoInfer.

Quiz · TypeScript
Medium
8 min

What are index signatures in TypeScript and what are their pitfalls?

Dictionaries vs exhaustive Records, noUncheckedIndexedAccess, and when to use Map.

Quiz · TypeScript
Medium
6 min

What is the difference between an interface and a type alias in TypeScript?

Declaration merging and extends vs unions, tuples and type-level computation.

Quiz · TypeScript
Easy
6 min

Explain `keyof`, `typeof` and indexed access types in TypeScript

Deriving key unions, value types and property types from existing code.

Quiz · TypeScript
Medium
6 min

What are mapped types in TypeScript and how does key remapping work?

Iterating keys to build types, modifiers, and as-based renaming and filtering.

Quiz · TypeScript
Medium
7 min

What is module augmentation in TypeScript and when would you use it?

Extending library and global types with declare module and declare global.

Quiz · TypeScript
Medium
6 min

How do you model immutability in TypeScript with `readonly`?

readonly modifiers, Readonly, readonly arrays and as const, and their limits.

Quiz · TypeScript
Medium
6 min

How do you write recursive types in TypeScript, and what are their limits?

Trees, JSON and deep utilities, tail recursion, and compiler performance.

Quiz · TypeScript
Hard
7 min

What does the `satisfies` operator do in TypeScript and how is it different from a type annotation or `as`?

Validate against a type while keeping precise inference.

Quiz · TypeScript
Medium
6 min

What does `strict` mode enable in TypeScript, and which extra flags are worth turning on?

The strict family, noUncheckedIndexedAccess, exactOptionalPropertyTypes and migration strategy.

Quiz · TypeScript
Medium
7 min

What is structural typing in TypeScript and what are its implications?

Compatibility by shape, excess property checks, and when you need nominal types.

Quiz · TypeScript
Easy
6 min

What are template literal types in TypeScript and what are they useful for?

Building and parsing string literal types for handlers, routes and typed paths.

Quiz · TypeScript
Hard
7 min

What are tuple types in TypeScript, including variadic and labeled tuples?

Fixed-position arrays, optional, rest and labeled elements, and variadic tuple types.

Quiz · TypeScript
Medium
6 min

What is the difference between a type assertion and a type annotation in TypeScript?

Checking vs overriding the compiler, non-null assertions, and safer alternatives.

Quiz · TypeScript
Easy
6 min

How does type narrowing work in TypeScript, and how do you write type guards?

Control-flow narrowing, user-defined and inferred type predicates, and assertion functions.

Quiz · TypeScript
Medium
7 min

What are type-only imports in TypeScript and what does `verbatimModuleSyntax` do?

Why per-file transpilers need explicit type imports, and the modern tsconfig setup.

Quiz · TypeScript
Medium
6 min

Do TypeScript types exist at runtime? How do you validate external data?

Type erasure, trust boundaries, schema validation and type stripping.

Quiz · TypeScript
Medium
7 min

How do you type event handlers in React with TypeScript?

Synthetic event types, handler aliases, target vs currentTarget, and DOM listener types.

Quiz · TypeScript
Easy
6 min

How do you type React component props in TypeScript?

Props types, ReactNode children, native element props, exclusive variants and React.FC.

Quiz · TypeScript
Easy
7 min

How do you type refs in React with TypeScript, and what changed in React 19?

DOM refs, mutable refs, ref as a prop, imperative handles and callback ref cleanups.

Quiz · TypeScript
Medium
7 min

How do you type `useReducer` state and actions in TypeScript?

Discriminated-union actions, exhaustive reducers and typed dispatch.

Quiz · TypeScript
Medium
7 min

What are `using` declarations (explicit resource management) in TypeScript?

Scope-bound cleanup with Symbol.dispose, await using and DisposableStack.

Quiz · TypeScript
Medium
6 min

Which built-in TypeScript utility types do you use most, and how do they work?

Partial, Pick, Omit, Record, ReturnType, Awaited and friends, plus their pitfalls.

Quiz · TypeScript
Easy
7 min

Explain covariance, contravariance and invariance in TypeScript

How generic and function types relate under subtyping, strictFunctionTypes and in/out annotations.

Quiz · TypeScript
Hard
9 min

Explain the difference between unit testing, integration testing, and end-to-end testing

Scope, speed, confidence and cost of each level, with front-end examples.

Quiz · JavaScript
Medium
6 min

What does the dependency array of `useEffect` affect?

When effects re-synchronize, Object.is comparison, and stale closures.

Quiz · React
Medium
7 min

What is the difference between `useEffect` and `useLayoutEffect` in React?

Effect timing relative to paint, and when blocking paint is worth it.

Quiz · React
Medium
7 min

How does the View Transitions API work for same-document and cross-document navigations?

startViewTransition, view-transition-name, pseudo-element tree, @view-transition for MPAs, support and pitfalls.

Quiz · CSS
Hard
9 min

Explain the different ways the `this` keyword can be bound

Default, implicit, explicit and new binding, arrow functions, and the precedence between them.

Quiz · JavaScript
Medium
6 min

What are the various ways to create objects in JavaScript?

Object literals, constructors, classes, Object.create, factories and structuredClone compared.

Quiz · JavaScript
Easy
5 min

What are the different ways to make an API call in JavaScript?

fetch, XHR, sendBeacon, WebSocket, SSE and data-fetching libraries, and when to use each.

Quiz · Web & Browser
Easy
6 min

How do you load web fonts without hurting LCP and CLS?

font-display, preloading, subsetting, self-hosting, variable fonts and metric-matched fallbacks.

Quiz · Performance
Medium
8 min

Explain the concept of the WebSocket API

Persistent full-duplex connections: handshake, client API, reconnection and auth concerns.

Quiz · Web & Browser
Medium
7 min

WebSockets vs Server-Sent Events vs long polling: how do you choose a real-time transport?

Directionality, infrastructure, reconnection, scaling and HTTP/2 implications for each real-time option.

Quiz · Web & Browser
Medium
9 min

What advantage is there for using the arrow syntax for a method in a constructor?

The main advantage of using an arrow function as a method inside a constructor is that the value of this gets set at the time of the function creation and can't

Quiz · JavaScript
Medium
3 min

What are data- attributes good for?

Before JavaScript frameworks became popular, front end developers used data- attributes to store extra data within the DOM itself, without other hacks such as n

Quiz · HTML
Medium
3 min

What are empty elements in HTML?

Empty elements in HTML are elements that do not contain any content between their opening and closing tags. Instead, they are self-closing tags, meaning they ha

Quiz · HTML
Medium
3 min

What are JavaScript polyfills for?

Filling missing APIs in older environments, how polyfills differ from transpilation, and their costs.

Quiz · JavaScript
Hard
6 min

What are Promises and how do they work?

Promise objects, chaining, error propagation, microtask scheduling and Promise.withResolvers.

Quiz · JavaScript
Easy
7 min

What are proxies in JavaScript used for?

Intercepting object operations with traps and Reflect: validation, reactivity, logging and their limits.

Quiz · JavaScript
Hard
8 min

What are server-sent events?

One-way streaming over HTTP with EventSource: format, reconnection, limits and alternatives.

Quiz · JavaScript
Hard
7 min

What are some of the advantages/disadvantages of writing JavaScript code in a language that compiles to JavaScript?

Some examples of languages that compile to JavaScript include CoffeeScript, Elm, ClojureScript, PureScript, and TypeScript.

Quiz · JavaScript
Medium
3 min

What are some of the "gotchas" for writing efficient CSS?

Firstly, understand that browsers match selectors from rightmost (key selector) to left. Browsers filter out elements in the DOM according to the key selector a

Quiz · CSS
Medium
3 min

What are `Symbol`s used for in JavaScript?

Unique property keys, the global registry, and well-known symbols that hook into language behaviour.

Quiz · JavaScript
Medium
6 min

What are the advantages and disadvantages of using Ajax?

- Better interactivity. New content from the server can be changed dynamically without the need to reload the entire page.

Quiz · JavaScript
Medium
3 min

What are the advantages/disadvantages of using CSS preprocessors?

- CSS is made more maintainable.

Quiz · CSS
Medium
3 min

What are the benefits of using spread syntax and how is it different from rest syntax?

ES6's spread syntax is very useful when coding in a functional paradigm as we can easily create copies of arrays or objects without resorting to Object.create,

Quiz · JavaScript
Medium
3 min

What are the differences between ES6 class and ES5 function constructors?

Let's first look at an example of each:

Quiz · JavaScript
Medium
3 min

What are the differences between variables created using let, var or const?

Variables declared using the var keyword are scoped to the function in which they are created, or if created outside of any function, to the global object. let

Quiz · JavaScript
Medium
3 min

What are the different ways to visually hide content (and make it available only for screen readers)?

These techniques are related to accessibility (a11y).

Quiz · CSS
Medium
3 min

What are the pros and cons of using Promises instead of callbacks?

- Avoid callback hell which can be unreadable.

Quiz · JavaScript
Medium
3 min

What are the various clearing techniques and which is appropriate for what context?

- Empty div method - <div style="clear:both;"</div.

Quiz · CSS
Medium
3 min

What are workers in JavaScript used for?

Dedicated, shared and service workers: off-main-thread work, messaging, transferables and limits.

Quiz · JavaScript
Hard
7 min

What do you think of AMD vs CommonJS?

Both are ways to implement a module system, which was not natively present in JavaScript until ES2015 came along. CommonJS is synchronous while AMD (Asynchronou

Quiz · JavaScript
Medium
3 min

What does a DOCTYPE do?

DOCTYPE is an abbreviation for Document Type. A DOCTYPE is always associated to a DTD - for Document Type Definition.

Quiz · HTML
Medium
3 min

What does * { box-sizing: border-box; } do? What are its advantages?

- By default, elements have box-sizing: content-box applied, and only the content size is being accounted for.

Quiz · CSS
Medium
3 min

What existing CSS frameworks have you used locally, or in production? How would you change/improve them?

- Bootstrap - Slow release cycle. Bootstrap 4 has been in alpha for almost 2 years. Add a spinner button component, as it is widely used.

Quiz · CSS
Medium
3 min

Explain what happens when the `useState` setter function is called in React

Enqueue, schedule, batch, render, reconcile, commit, and the state snapshot.

Quiz · React
Medium
7 min

What happens, end to end, when you type a URL into the browser and press Enter?

From URL parsing, HSTS and DNS through TLS, HTTP/2 or HTTP/3, caching, parsing and rendering.

Quiz · Web & Browser
Medium
12 min

What is a closure, and how/why would you use one?

A closure is the combination of a function and the lexical environment within which that function was declared. The word "lexical" refers to the fact that lexic

Quiz · JavaScript
Medium
3 min

What is CSS selector specificity and how does it work?

The browser determines what styles to show on an element depending on the specificity of CSS rules. We assume that the browser has already determined the rules

Quiz · CSS
Medium
3 min

What is JSX and how does it work?

How JSX compiles to element-creating calls and the rules that follow.

Quiz · React
Easy
5 min

What is progressive rendering?

Progressive rendering is the name given to techniques used to improve the performance of a webpage (in particular, improve perceived load time) to render conten

Quiz · HTML
Medium
3 min

What is the use of `Promise.all()`

Running independent async work in parallel, fail-fast semantics and concurrency limits.

Quiz · JavaScript
Easy
5 min

What does re-rendering mean in React?

Render vs commit, what triggers re-renders, and when they become a problem.

Quiz · React
Easy
6 min

What is React? Describe the benefits of React

What React is, why teams choose it, and its honest trade-offs.

Quiz · React
Easy
5 min

What is the CSS display property and can you give a few examples of its use?

- none, block, inline, inline-block, flex, grid, table, table-row, table-cell, list-item.

Quiz · CSS
Medium
3 min

What is the definition of a higher-order function?

A higher-order function is any function that takes one or more functions as arguments, which it uses to operate on some data, and/or returns a function as a res

Quiz · JavaScript
Medium
3 min

What is the difference between == and ===?

== is the abstract equality operator while === is the strict equality operator. The == operator will compare for equality after doing any necessary type convers

Quiz · JavaScript
Medium
3 min

What is the difference between canvas and SVG?

Canvas is raster-based, working with pixels, while SVG is vector-based, employing mathematical descriptions of shapes. Canvas employs imperative drawing, where

Quiz · HTML
Medium
3 min

What is the DOM and how is it structured?

The live tree of nodes the browser builds from HTML, node types, and how it relates to rendering.

Quiz · JavaScript
Easy
5 min

What is the extent of your experience with Promises and/or their polyfills?

Possess working knowledge of it. A promise is an object that may produce a single value sometime in the future: either a resolved value or a reason that it's no

Quiz · JavaScript
Medium
3 min

What is "use strict";? What are the advantages and disadvantages to using it?

'use strict' is a statement used to enable strict mode to entire scripts or individual functions. Strict mode is a way to opt into a restricted variant of JavaS

Quiz · JavaScript
Medium
3 min

What is virtual DOM in React?

An in-memory description of the UI that React diffs to update the real DOM.

Quiz · React
Easy
5 min

What kind of things must you be wary of when designing or developing for multilingual sites?

- Use lang attribute in your HTML.

Quiz · HTML
Medium
3 min

What language constructions do you use for iterating over object properties and array items?

- for-in loops - for (var property in obj) { console.log(property); }. However, this will also iterate through its inherited properties, and you will add an obj

Quiz · JavaScript
Medium
4 min

What's a typical use case for anonymous functions?

They can be used in IIFEs to encapsulate some code within a local scope so that variables declared in it do not leak to the global scope.

Quiz · JavaScript
Medium
3 min

What's the difference between a relative, fixed, absolute and statically positioned element?

A positioned element is an element whose computed position property is either relative, absolute, fixed or sticky.

Quiz · CSS
Medium
3 min

What's the difference between a variable that is: null, undefined or undeclared? How would you go about checking for any of these states?

Undeclared variables are created when you assign a value to an identifier that is not previously created using var, let or const. Undeclared variables will be d

Quiz · JavaScript
Medium
3 min

What's the difference between an "attribute" and a "property"?

Attributes are defined on the HTML markup but properties are defined on the DOM. To illustrate the difference, imagine we have this text field in our HTML: <inp

Quiz · JavaScript
Medium
3 min

What's the difference between .call and .apply?

Both .call and .apply are used to invoke functions and the first parameter will be used as the value of this within the function. However, .call takes in comma-

Quiz · JavaScript
Medium
3 min

What's the difference between feature detection, feature inference, and using the UA string?

Feature detection involves working out whether a browser supports a certain block of code, and running different code depending on whether it does (or doesn't),

Quiz · JavaScript
Medium
3 min

What's the difference between host objects and native objects?

Native objects are objects that are part of the JavaScript language defined by the ECMAScript specification, such as String, Math, RegExp, Object, Function, etc

Quiz · JavaScript
Medium
3 min

What's the difference between inline and inline-block?

I shall throw in a comparison with block for good measure.

Quiz · CSS
Medium
3 min

What's the difference between "resetting" and "normalizing" CSS? Which would you choose, and why?

- Resetting - Resetting is meant to strip all default browser styling on elements. For e.g. margins, paddings, font-sizes of all elements are reset to be the sa

Quiz · CSS
Medium
3 min

What tools and techniques do you use for debugging JavaScript code?

- Good old console.log debugging

Quiz · JavaScript
Medium
3 min

When would you use document.write()?

document.write() writes a string of text to a document stream opened by document.open(). When document.write() is executed after the page has loaded, it will ca

Quiz · JavaScript
Medium
3 min

Where should a browser app store JWTs or session tokens: localStorage, memory or cookies?

XSS vs CSRF exposure, HttpOnly cookies, in-memory access tokens with refresh rotation, and the BFF pattern.

Quiz · Security
Hard
10 min

Why is extending built-in JavaScript objects not a good idea?

Extending a built-in/native JavaScript object means adding properties/functions to its prototype. While this may seem like a good idea at first, it is dangerous

Quiz · JavaScript
Medium
3 min

Why is it called a Ternary expression, what does the word "Ternary" indicate?

"Ternary" indicates three, and a ternary expression accepts three operands, the test condition, the "then" expression and the "else" expression. Ternary express

Quiz · JavaScript
Medium
3 min

Why is it generally a good idea to position CSS <link>s between <head></head> and JS <script>s just before </body>? Do you know any exceptions?

Putting <links in the <head is part of proper specification in building an optimized website. When a page first loads, HTML and CSS are being parsed simultaneou

Quiz · HTML
Medium
4 min

Why is it, in general, a good idea to leave the global scope of a website as-is and never touch it?

Every script has access to the global scope, and if everyone uses the global namespace to define their variables, collisions will likely occur. Use the module p

Quiz · JavaScript
Medium
3 min

Why might you want to create static class members?

Static class members (properties/methods) are not tied to a specific instance of a class and have the same value regardless of which instance is referring to it

Quiz · JavaScript
Medium
3 min

Why does React recommend against mutating state?

Reference equality, memoization, snapshots and concurrent rendering all assume immutability.

Quiz · React
Easy
6 min

Why would you use something like the load event? Does this event have disadvantages? Do you know any alternatives, and why would you use those?

The load event fires at the end of the document loading process. At this point, all of the objects in the document are in the DOM, and all the images, scripts,

Quiz · JavaScript
Medium
3 min

Why you would use a srcset attribute in an image tag? Explain the process the browser uses when evaluating the content of this attribute.

You would use the srcset attribute when you want to serve different images to users depending on their device display width - serve higher quality images to dev

Quiz · HTML
Medium
3 min

How do you use the window.history API?

pushState, replaceState, popstate and the building blocks of client-side routing.

Quiz · Web & Browser
Easy
6 min

What is the difference between the Window object and the Document object?

The global browsing-context object versus the DOM tree of the loaded page.

Quiz · Web & Browser
Medium
5 min

How do you write unit tests for JavaScript code?

Arrange-act-assert, testing behaviour not implementation, isolation and edge cases.

Quiz · JavaScript
Medium
6 min

What are the differences between `XMLHttpRequest` and `fetch()` in JavaScript and browsers?

Promise-based fetch versus event-based XHR: errors, cancellation, streaming, progress and cookies.

Quiz · JavaScript
Easy
6 min

Explain stored, reflected and DOM-based XSS. Does using React make you safe?

The three XSS classes, what JSX escaping does and doesn't cover, and defence in depth.

Quiz · Security
Medium
9 min

Analytics Event Pipeline and Client SDK

Design a product-analytics client SDK and event pipeline with a governed tracking plan, reliable delivery, consent and privacy, used by every team.

System Design
Hard
50 min

Autocomplete / Typeahead Component

Design a reusable, accessible autocomplete component with debounced search, caching, race handling and keyboard navigation.

System Design
Medium
45 min

Chat Application (e.g. Messenger)

Design a real-time web messenger with conversations, delivery and read receipts, typing indicators and offline support.

System Design
Hard
45 min

Collaborative Document Editor (e.g. Google Docs)

Design a real-time collaborative rich-text editor with presence, comments, offline edits and version history.

System Design
Hard
60 min

Collaborative Spreadsheet (e.g. Google Sheets)

Design a browser spreadsheet with a virtualized grid, formula engine, dependency graph and real-time co-editing.

System Design
Hard
60 min

Data Table / Data Grid Component

Design a reusable data table with sorting, filtering, pagination, selection, column resizing and virtualization.

System Design
Hard
45 min

Date Picker Component

Design an accessible, localised date and date-range picker with keyboard grid navigation, time zones and validation.

System Design
Medium
40 min

Design System at Scale

Design a company-wide design system (tokens, components, docs, tooling) consumed by dozens of teams across multiple frameworks and brands.

System Design
Hard
60 min

Collaborative Design / Drawing Tool (e.g. Figma, Canva)

Design a multiplayer vector canvas with an infinite viewport, shape editing, hit testing, cursors and undo.

System Design
Hard
60 min

Dropdown Menu Component

Design an accessible dropdown/action menu with submenus, typeahead, robust positioning and focus management.

System Design
Medium
45 min

E-commerce Marketplace (e.g. Amazon)

Design the front end of a large e-commerce site: search and listing, product detail, cart and checkout, with SEO and Core Web Vitals in mind.

System Design
Hard
45 min

Email Client (e.g. Outlook / Gmail)

Design a web email client: folders and threaded inbox, safe rendering of HTML emails, composer with drafts, offline and keyboard-driven workflows.

System Design
Hard
45 min

Embeddable Widget SDK (Third-Party Script)

Design a third-party embeddable widget and loader script that runs on thousands of customer sites, covering isolation, versioning, security and performance.

System Design
Hard
55 min

Feature Flag and Experimentation Platform

Design a feature-flag and A/B testing platform with targeting rules, client SDKs, real-time updates, exposure logging and governance.

System Design
Hard
60 min

Front-End Monorepo and CI Platform

Design the repository, build, test and CI/CD platform for 30 front-end teams sharing one monorepo, with affected builds, remote caching and governance.

System Design
Hard
60 min

Front-End Observability Platform (RUM, Errors, Tracing)

Design an org-wide front-end observability platform covering real user monitoring, error tracking with source maps, and distributed tracing.

System Design
Hard
60 min

Image Carousel Component

Design an accessible, performant image carousel with swipe, autoplay, lazy loading and responsive images.

System Design
Medium
45 min

Image Uploader Component

Design a multi-file image uploader with previews, client-side resizing, resumable direct-to-storage uploads and progress.

System Design
Medium
40 min

Localization Platform (i18n at Scale)

Design an org-wide localization platform: message format, extraction, translation workflow, delivery, runtime SDK, RTL and quality checks.

System Design
Hard
50 min

Micro-Frontend Platform

Design a platform that lets many teams build, deploy and compose independently released front-ends into one coherent product.

System Design
Hard
60 min

Modal Dialog Component

Design an accessible modal dialog: native dialog vs custom, focus trapping, scroll locking, stacking and API.

System Design
Medium
40 min

Music Streaming Web Player (e.g. Spotify)

Design a music web app with uninterrupted playback across navigation, a queue, gapless streaming, DRM and multi-device control.

System Design
Hard
45 min

News Feed (e.g. Facebook)

Design an infinitely scrolling, personalised social feed with posts, reactions, comments and live updates.

System Design
Medium
45 min

Offline-First PWA with Sync and Conflict Resolution

Design an offline-first progressive web app for field workers, covering local storage, background sync, conflict resolution and platform rollout.

System Design
Hard
60 min

Photo Sharing App (e.g. Instagram)

Design a photo-first social app: image feed, profile grid, upload with client-side processing, and likes and comments.

System Design
Medium
45 min

Pinterest (Masonry Image Feed)

Design a Pinterest-style home feed: a responsive masonry grid of variable-height pins with infinite scroll and virtualization.

System Design
Hard
45 min

Embeddable Poll Widget

Design a poll widget embeddable on many sites, with voting, live results, abuse prevention and isolation.

System Design
Medium
40 min

Real-Time Collaborative Whiteboard

Design a Miro/FigJam-style multiplayer whiteboard: canvas rendering at scale, CRDT-based sync, presence, offline, permissions and the multiplayer service.

System Design
Hard
60 min

Rich Text Editor Component

Design a reusable rich text editor: document model vs contenteditable, transactions, plugins, paste, IME and accessibility.

System Design
Hard
45 min

Travel Booking Site (e.g. Airbnb)

Design a stays marketplace: search with map and date range, listing details, availability calendar and a reliable booking flow.

System Design
Hard
45 min

Video Conferencing App (e.g. Zoom, Google Meet)

Design a browser video meeting app with WebRTC, an SFU, simulcast, adaptive layouts, screen sharing and chat.

System Design
Hard
60 min

Video Streaming Service (e.g. Netflix)

Design a Netflix-style web client: browse rows of titles, a video player with adaptive bitrate streaming, DRM, and resume playback.

System Design
Hard
45 min

Org-Wide Web Performance Program (Core Web Vitals)

Design an organisation-wide web performance program: CWV measurement, budgets, CI gates, ownership, tooling and the roadmap to pass Core Web Vitals across many apps.

System Design
Hard
50 min

Accordion

Build an accessible accordion with expandable sections and full keyboard support.

UI Coding
Easy
25 min

Accordion II: Single Open, Controlled

Extend an accordion so only one section is open at a time, with optional collapsing and a controlled API.

UI Coding
Medium
25 min

Analog Clock

Draw a ticking analog clock in SVG with correctly rotated hour, minute and second hands and an accessible name.

UI Coding
Medium
30 min

Auth Code Input

Build a one-time-code input split into digit boxes with auto-advance, backspace, arrow keys and paste support.

UI Coding
Medium
30 min

Autocomplete / Typeahead

Build an accessible combobox that searches an async API with debouncing, caching and race-condition handling.

UI Coding
Hard
45 min

Birth Year Histogram

Bucket a list of birth years into a bar-chart histogram with adjustable bucket size and an accessible data-table view.

UI Coding
Medium
30 min

Connect Four

Build Connect Four with gravity drops, last-move win detection, column-based keyboard controls and announced moves.

UI Coding
Hard
50 min

Contact Form

Build a contact form with accessible inline validation, a submitting state and a success message.

UI Coding
Easy
25 min

Data Table

Build a paginated users table with a rows-per-page selector and previous/next navigation.

UI Coding
Medium
25 min

Data Table II: Sorting and Filtering

Add sortable column headers and a search filter to a paginated users table.

UI Coding
Medium
35 min

Data Table III: Generic Columns

Turn a users-only table into a reusable DataTable driven by column definitions with renderers, sorting and typed filters.

UI Coding
Hard
50 min

Date Picker

Build a date input with a calendar dialog following the WAI-ARIA date picker pattern: grid keyboard navigation, focus trap and return.

UI Coding
Hard
60 min

Dice Roller

Roll a chosen number of six-sided dice, draw each face with CSS pips and announce the total accessibly.

UI Coding
Easy
20 min

Digital Clock

Build a ticking digital clock that stays aligned to real seconds, with a 12/24-hour toggle and clean timer teardown.

UI Coding
Easy
20 min

Drag-and-Drop Sortable List

Build a reorderable list with pointer dragging and a full keyboard alternative: pick up, move, drop or cancel, with announcements.

UI Coding
Hard
55 min

Dropdown Menu

Build an accessible menu button: open and close, arrow-key and typeahead navigation, outside click and focus return.

UI Coding
Medium
35 min

File Explorer

Render a nested folder/file tree where folders expand and collapse, sorted folders-first.

UI Coding
Medium
30 min

File Explorer II: Keyboard Tree

Turn a file explorer into a WAI-ARIA tree view with roving focus, arrow-key navigation and type-ahead.

UI Coding
Hard
45 min

Flight Booker

Build a one-way or return flight form with date constraints, disabled states and a booking confirmation.

UI Coding
Easy
20 min

Generate Table

Generate a numbered table from row and column inputs, filled row by row, column by column or in a snake pattern.

UI Coding
Easy
20 min

Grid Lights

Build a grid of toggle lights that, once all are lit, switch off one by one in reverse activation order.

UI Coding
Medium
30 min

Hello World Counter

Build a counter with increment, decrement and reset that never drops below zero and announces its value.

UI Coding
Easy
10 min

Holy Grail Layout

Build the classic header, three columns and footer layout with CSS Grid, landmarks, a sticky footer and responsive stacking.

UI Coding
Easy
20 min

Image Carousel

Build an accessible image carousel with previous/next controls, wrap-around and dot navigation.

UI Coding
Medium
30 min

Image Carousel II: Infinite Transitions

Extend the image carousel with sliding animations that loop seamlessly in both directions.

UI Coding
Hard
45 min

Infinite Scroll Feed

Build a cursor-paginated feed that loads more posts as you scroll, with abort handling, retries and the ARIA feed pattern.

UI Coding
Medium
40 min

Job Board

Build a paginated job board on a Hacker News-style API: fetch ids, then load job details in parallel pages.

UI Coding
Medium
40 min

Kanban Board

Build a kanban board with normalised state, adding and deleting cards, and moving cards between columns by pointer or keyboard.

UI Coding
Hard
60 min

Like Button

Build a toggle Like button that talks to a flaky API, with pending, error and accessible pressed states.

UI Coding
Easy
20 min

Memory Game

Build a card-matching memory game with timed flip-back, move counting and screen-reader friendly announcements.

UI Coding
Medium
40 min

Modal Dialog

Build a reusable modal dialog with a portal, labelled dialog semantics, Escape and backdrop dismissal, and focus restoration.

UI Coding
Medium
30 min

Modal Dialog II: Focus Trap and Inert Background

Make a modal fully accessible: Tab and Shift+Tab stay inside, the background is inert, and focus is managed from open to close.

UI Coding
Hard
40 min

Mortgage Calculator

Calculate the monthly payment, total cost and total interest of a fixed-rate loan as the user types.

UI Coding
Easy
20 min

Multi-step Form Wizard

Build a three-step sign-up wizard with per-step validation, a progress indicator, focus management and a review step.

UI Coding
Medium
45 min

Nested Checkboxes

Build a checkbox tree where parents reflect their children as checked, unchecked or indeterminate.

UI Coding
Medium
30 min

Pixel Art Editor

Build a 16×16 pixel-art editor with a colour palette, draw/erase tools, click-and-drag painting and keyboard drawing.

UI Coding
Medium
35 min

Progress Bar

Build a reusable, accessible progress bar that clamps its value and shows the percentage.

UI Coding
Easy
15 min

Progress Bars

Each click adds a progress bar that fills from 0 to 100% over two seconds, driven by requestAnimationFrame.

UI Coding
Medium
25 min

Progress Bars II: Concurrency Limit

Extend the progress bars so at most three fill at once while the rest wait in a queue.

UI Coding
Medium
25 min

Progress Bars III: Pause and Resume

Queue-limited progress bars that can be paused and resumed without losing progress, driven by one shared clock.

UI Coding
Hard
40 min

Selectable Cells (Drag Select)

Build a grid where dragging selects a rectangle of cells, with modifier-key multi-select and a full keyboard equivalent.

UI Coding
Hard
40 min

Sign-up Form Validation

Build a sign-up form with on-blur validation, a live password checklist, cross-field checks and a show-password toggle.

UI Coding
Medium
35 min

Star Rating

Build a star rating input with hover preview, keyboard support and a clear button, built on native radios.

UI Coding
Easy
20 min

Stopwatch

Build an accurate stopwatch with start, stop, lap and reset, based on timestamps rather than counting ticks.

UI Coding
Medium
30 min

Tabs

Build a tabs component that shows one panel at a time, with the correct tab roles and selected state.

UI Coding
Easy
20 min

Tabs II: Keyboard Accessible

Add roving tabindex, arrow-key navigation and automatic or manual activation to a tabs component.

UI Coding
Medium
30 min

Temperature Converter

Two linked inputs, Celsius and Fahrenheit, that update each other and handle invalid input gracefully.

UI Coding
Easy
15 min

Tic-tac-toe

Build a two-player tic-tac-toe game with win and draw detection, a live status and a keyboard-navigable board.

UI Coding
Medium
30 min

Tic-tac-toe II: N × N, M in a Row

Generalise tic-tac-toe to a configurable N × N board where M marks in a row win, with an efficient last-move win check.

UI Coding
Hard
45 min

Toast Notifications

Build a toast system with a context API, live-region announcements, auto-dismiss that pauses on hover or focus, and a visible limit.

UI Coding
Medium
35 min

Todo List

Build a todo list with add, complete, delete and filters, using semantic forms and good focus management.

UI Coding
Easy
25 min

Tooltip and Popover

Build an accessible hover/focus tooltip and a click-triggered popover, and explain when to use each.

UI Coding
Medium
35 min

Traffic Light

Build a traffic light that cycles through configurable states with timers, a pause control and clean effect teardown.

UI Coding
Medium
25 min

Transfer List

Move checked items between two lists with per-list select-all and bulk transfer controls.

UI Coding
Medium
30 min

Tweet Card

Build a social post card with semantic markup, relative timestamps, compact counts and accessible action buttons.

UI Coding
Easy
25 min

Users Database (CRUD)

Build a small users database with search, a keyboard-accessible listbox, and create, update, delete and cancel actions.

UI Coding
Medium
40 min

Virtualized List

Render a 10,000-row list smoothly by windowing: only the visible rows plus overscan are in the DOM.

UI Coding
Hard
50 min

Whack-a-Mole

Build a timed whack-a-mole game with random moles, scoring, a countdown and keyboard play, managing several timers safely.

UI Coding
Medium
35 min

Wordle

Build a Wordle clone with physical and on-screen keyboards, correct duplicate-letter scoring and accessible feedback.

UI Coding
Hard
60 min