Frontend interview practice
Frontend Interview Questions & Coding Practice
Practice 685 real-world questions covering JavaScript, algorithms, React, and UI components. Find a challenge by skill and difficulty, or follow a guided preparation plan for your next frontend interview.
Frontend interview practice questions
- JavaScriptCoding exercise
classNames
MEDIUMImplement a utility that conditionally joins class name arguments into a single space-separated string.
25 minMetaPractice - JavaScriptCoding exercise
Count By
MEDIUMImplement a function that tallies how many array elements map to each key produced by an iteratee.
25 minPractice - JavaScriptCoding exercise
Deep Freeze
MEDIUMRecursively freeze an object and every nested object and array, making the whole structure deeply immutable.
25 minPremium questionPractice - AlgorithmsCoding exercise
Find Element in Rotated Array
MEDIUMImplement a function that locates a target integer in a sorted array that has been rotated at an unknown pivot.
25 minPremium questionPractice - JavaScriptCoding exercise
Flatten
MEDIUMImplement a function that recursively flattens a nested array into a single-level array.
25 minAirbnb · Amazon · Apple +10Practice - JavaScriptCoding exercise
Function.prototype.apply
MEDIUMImplement Function.prototype.myApply — invoke the function with a given `this` and an array of arguments.
25 minPractice - JavaScriptCoding exercise
Group By
MEDIUMImplement a function that buckets array elements into an object keyed by the value an iteratee returns for each.
25 minLinkedIn · ThoughtspotPractice - JavaScriptCoding exercise
Intersection By
MEDIUMImplement a function that intersects arrays by comparing values produced by an iteratee, keeping uniqueness.
25 minPractice - JavaScriptCoding exercise
Intersection With
MEDIUMImplement a function that intersects arrays using a user-supplied comparator to decide equality between elements.
25 minPractice - AlgorithmsCoding exercise
Matrix Rotation
MEDIUMRotate an n×n matrix 90 degrees clockwise and return the result as a new array.
25 minAmazon · Apple · MicrosoftPractice - AlgorithmsCoding exercise
Maximum Product in Contiguous Array
MEDIUMImplement a function that finds the contiguous subarray with the largest product, handling negatives and zeros.
25 minPractice - AlgorithmsCoding exercise
Maximum Sum in Contiguous Array
MEDIUMImplement a function that finds the contiguous subarray with the largest sum.
25 minPractice - AlgorithmsCoding exercise
Maximum Water Trapped Between Walls
MEDIUMImplement a function that finds the maximum amount of water that can be trapped between two walls.
25 minPractice - JavaScriptCoding exercise
orderBy
MEDIUMImplement orderBy — stably sort objects by multiple keys, each ascending or descending.
25 minPractice - JavaScriptCoding exercise
partition
MEDIUMImplement partition — split an array into elements that pass a predicate and those that fail, in one pass.
25 minPractice - AlgorithmsCoding exercise
Partition Equal Subset Sum
MEDIUMDecide whether an array can split into two subsets with equal sums — a subset-sum dynamic-programming problem over half the total.
25 minPremium questionPractice - AlgorithmsCoding exercise
Quickselect
MEDIUMFind the k-th smallest element of an unsorted array in average linear time by partitioning, without fully sorting it.
25 minPremium questionPractice - AlgorithmsCoding exercise
Smallest Element in Rotated Sorted Array
MEDIUMImplement a function that finds the minimum value in a sorted array that has been rotated at an unknown pivot.
25 minPremium questionPractice - JavaScriptCoding exercise
Union By
MEDIUMImplement a function that returns unique values across input arrays using a custom iteratee to determine identity.
25 minPractice - JavaScriptCoding exercise
zip / unzip
MEDIUMImplement zip, unzip, and zipObject — interleave arrays into tuples and back, padding ragged lengths.
25 minPractice - JavaScriptCoding exercise
Immutable Array Methods
MEDIUMImplement the ES2023 change-by-copy trio — toSorted, toReversed, and with — that copy an array instead of mutating it.
30 minPremium questionPractice - JavaScriptCoding exercise
Pull / PullAll
MEDIUMImplement lodash pull and pullAll — remove every occurrence of the given values from an array in place, mutating the original.
30 minPremium questionPractice - JavaScriptCoding exercise
Shuffle / Sample Size
MEDIUMImplement lodash shuffle and sampleSize with an unbiased Fisher-Yates swap, taking an injectable RNG so shuffles are testable.
30 minPremium questionPractice - JavaScriptCoding exercise
classNames II
HARDExtend the classNames utility to dedupe class names and resolve function arguments lazily.
40 minPractice - JavaScriptCoding exercise
Data Selection
HARDImplement a function that filters an array of row objects by a flexible field-and-condition specification.
40 minAmazon · Meta · OpenAI +3Practice - AlgorithmsCoding exercise
Median of Two Sorted Arrays
HARDFind the median of two sorted arrays in logarithmic time by binary-searching for the partition that splits all the elements into equal halves.
40 minPremium questionPractice - JavaScriptCoding exercise
Function Length
EASYImplement a function that returns the number of declared parameters of a given function.
15 minPractice - JavaScriptCoding exercise
Object Map
EASYImplement a function that returns a new object with every value transformed by a mapper callback.
15 minPractice - JavaScriptCoding exercise
Object.entries
EASYImplement Object.entries — return an object's own enumerable string-keyed [key, value] pairs in insertion order.
15 minPractice - JavaScriptCoding exercise
Object.fromEntries
EASYImplement Object.fromEntries — build an object from any iterable of [key, value] pairs, with later keys winning.
15 minPractice - JavaScriptCoding exercise
Size
EASYImplement a function that returns the element count of any collection — array, string, object, Map, or Set.
15 minPractice - JavaScriptCoding exercise
Type Utilities
EASYImplement a set of helper functions that report the primitive type of any JavaScript value.
15 minPractice - JavaScriptCoding exercise
Is Empty
MEDIUMImplement a function that decides whether a value is empty across arrays, strings, objects, Maps, Sets, and primitives.
20 minPremium questionPractice - JavaScriptCoding exercise
Camel Case Keys
MEDIUMImplement a function that returns a new object with every key converted to camelCase, recursing into nested objects.
25 minAirbnb · GooglePractice - JavaScriptCoding exercise
Compact II
MEDIUMImplement a function that returns a deep copy of an object with all falsy values stripped from nested structures.
25 minPremium questionPractice - JavaScriptCoding exercise
Conforms To
MEDIUMImplement a function that checks whether an object satisfies a source schema of predicate validators.
25 minPremium questionPractice - JavaScriptCoding exercise
Deep Clone
MEDIUMImplement a function that recursively clones a JSON-serializable value without sharing references.
25 minAdobe · Amazon · ByteDance +4Practice - JavaScriptCoding exercise
Deep Merge
MEDIUMImplement a function that recursively merges two objects, combining nested properties rather than overwriting them.
25 minPractice - JavaScriptCoding exercise
Deep Omit
MEDIUMImplement a function that returns a copy of a value with the given keys stripped from every nested object.
25 minGooglePractice - JavaScriptCoding exercise
Event Emitter
MEDIUMImplement an EventEmitter class supporting on, off, and emit to register and trigger listeners.
25 minAirbnb · ByteDance · Canva +13Practice