01
JavaScript reasoning
3 questionsQ01
Explain a closure using a real use case.
A function keeps access to its lexical environment after the outer call ends. Show a private counter or callback factory, then explain which variables stay shared and which are fresh per invocation.
Common mistake
Reciting “function inside a function” misses the captured environment.
Go one level deeper ↗
What happens when several callbacks share one mutable variable?
Q02
Predict the order of synchronous code, promises, and timers.
Run synchronous work first, then queued microtasks after the current stack finishes, before the next task. Explain how repeated microtasks can delay timers and rendering; do not promise an exact timer delay.
Common mistake
Saying setTimeout with zero delay runs immediately.
Go one level deeper ↗
What happens if a microtask keeps scheduling itself?
Q03
How would you debounce a search input?
Delay the search until typing pauses, cancel the previous timer, and clean up on disposal. Then protect against stale responses separately. Clarify leading versus trailing invocation and whether submitting should flush pending work.
Common mistake
Treating debounce as race-condition protection.
Go one level deeper ↗
When would throttle fit better?
02
React reasoning
3 questionsQ04
How do you keep the right state attached to a row?
Use stable item identity and keys, then explain how sorting, inserting, and deleting affect local row state. Demonstrate the failure using an editable row before proposing a fix.
Common mistake
Using an array index for a reorderable list.
Go one level deeper ↗
When should switching records deliberately reset state?
Q05
How would you synchronize a component with a subscription?
Describe effect setup, dependencies, and cleanup. Test switching the subscribed entity and unmounting, and account for the development setup/cleanup check.
Common mistake
Leaving the previous subscription active.
Go one level deeper ↗
Would this logic be an effect or an event handler?
Q06
How would you investigate a slow React screen?
Measure the interaction, distinguish React rendering from browser layout and network latency, and optimize the expensive part. Check state ownership, consumer updates, and list size before adding caches.
Common mistake
Memoizing every callback without profiling.
Go one level deeper ↗
Would virtualization help if the bottleneck is a server request?
03
CSS implementation
3 questionsQ07
Choose a layout for a toolbar and a dashboard.
Explain why a toolbar is usually one-dimensional Flexbox while a dashboard often needs aligned Grid tracks. Discuss wrapping, minimum sizes, and how the layout survives smaller containers.
Common mistake
Choosing by habit rather than the alignment requirements.
Go one level deeper ↗
What changes for a dashboard card placed in a sidebar?
Q08
Why is a dropdown behind a sibling despite a high z-index?
Inspect stacking contexts and clipping separately. A child is bounded by its parent context; change the hierarchy or overlay mounting location when needed.
Common mistake
Increasing z-index without examining ancestors.
Go one level deeper ↗
Would moving the element solve overflow clipping too?
Q09
How would you validate a responsive interface?
Test narrow and wide containers, text zoom, long strings, keyboard access, and image failures. Use intrinsic sizing before piling on device-specific breakpoints.
Common mistake
Testing only one desktop screenshot.
Go one level deeper ↗
How does a reusable card respond to its own available width?
04
Browser fundamentals
3 questionsQ10
What happens when a browser can reuse a cached response?
Separate freshness from revalidation. A fresh response can be reused; a stale response may need a validator such as ETag and a conditional request. Explain private data and invalidation before choosing a cache lifetime.
Common mistake
Using long shared-cache lifetimes for personalized responses.
Go one level deeper ↗
How does no-cache differ from no-store?
Q11
Why can a request work in curl but fail in the browser?
CORS is enforced by browsers for cross-origin access. Identify the origins, whether preflight is required, and the response headers. Credentialed access requires a permitted explicit origin and appropriate credential handling.
Common mistake
Treating CORS as server authentication.
Go one level deeper ↗
Why is a wildcard origin unsuitable for credentialed access?
Q12
How does a browser turn HTML and CSS into pixels?
Describe parsing, style calculation, layout, paint, and compositing. Relate a slow interaction to actual work and use a trace to locate it rather than declaring every animation cheap.
Common mistake
Assuming every transform always avoids all rendering cost.
Go one level deeper ↗
How can interleaved DOM writes and layout reads cause repeated work?
05
Machine coding rounds
3 questionsQ13
Plan an autocomplete before writing code.
Clarify matching, debounce, minimum query length, keyboard selection, loading/empty/error states, and stale-response handling. Build a usable basic flow, then add caching and accessible combobox behavior.
Common mistake
Starting with styling while selection and request races are undefined.
Go one level deeper ↗
How would you test reversed response order?
Q14
How would you implement infinite scrolling?
Define the paging contract and termination condition, observe a sentinel, and guard duplicate requests. Include retry, cleanup, deduplication, and an accessible alternative to automatic loading. Virtualization is a separate decision.
Common mistake
Firing another page request while the previous one is pending.
Go one level deeper ↗
What happens when a page fails after earlier pages succeeded?
Q15
What does a complete modal implementation include?
Cover opening and closing, accessible naming, focus entry and restoration, focus containment, Escape behavior, backdrop policy, and scroll handling. Discuss nested overlays and whether a native dialog meets the requirements.
Common mistake
Calling a centered div a finished dialog.
Go one level deeper ↗
Where does focus go if the original trigger disappears?
06
System design rounds
3 questionsQ16
Design a frontend data table.
Clarify dataset size and server versus client ownership of sorting/filtering. Choose pagination and URL state, then discuss virtualization, keyboard navigation, selection across pages, and request cancellation.
Common mistake
Sorting only the current page of a server-paginated dataset as if it were the full dataset.
Go one level deeper ↗
How does “select all” work across unloaded pages?
Q17
Design a realtime chat interface.
Model pending, sent, delivered, failed, and read states with stable IDs. Plan history pagination, duplicate handling, reconnect/resume, optimistic updates, and scroll behavior before choosing a transport.
Common mistake
Assuming a successful socket send proves recipient delivery.
Go one level deeper ↗
How do you reconcile an optimistic message with the server acknowledgement?
Q18
Design a reliable file-upload UI.
Define queued, uploading, paused where supported, successful, failed, and canceled states. Plan concurrency, progress, retries, server validation, and resumability. Explain which guarantees require a backend upload protocol.
Common mistake
Promising resume support with only a client-side progress bar.
Go one level deeper ↗
What happens after the page reloads halfway through a large upload?
FROM READING TO DOINGBuild your preparation plan.
- 01
Revise JavaScript and browser fundamentals, then React and CSS gaps.
- 02
Attempt autocomplete, infinite scroll, and a modal without reading the solution.
- 03
Review your failure cases, then explain a data table or chat design aloud.
Junior candidates: focus on clear fundamentals and a working accessible UI with loading and error handling.
Experienced candidates: add scale, caching, consistency, observability, and explicit client/server boundaries. Ask your recruiter about the actual round format.
Avoid reading solutions without attempting the problem, polishing visuals before correctness, or rehearsing architecture without clarifying requirements.
Keep the references close.
These are editorial practice questions, not a verified list of questions asked by a particular company.