Skip to content
tezvyn:

🌐Frontend Dev

Frontend web development and UI engineering

585 bites

Test yourself: Top 30 intermediate Frontend Dev interview questionsMultiple choice, with the correct answer and why it is correct on every question. Free, no sign-in.

Intermediate everything in Frontend Dev, page 11

intermediate2 min read

How do you type a GeoJSON Coordinate tuple and LineString array?

Tests fixed-length tuple typing versus flexible arrays in TypeScript. A strong answer uses [number, number] for Coordinate, then Coordinate[] for LineString, and explains why number[] loses length safety. Red flag: using number[] or objects instead of tuples.

intermediate2 min read

How would you combine BaseRecord and PostContent into a Post type?

This tests TypeScript type composition for API resources. A strong answer proposes an intersection type or interface extends, then discusses overlap conflicts and the type versus interface trade-off.

intermediate3 min read

Write a generic ApiResponse<T> type with success and error states

Define two interfaces sharing a status literal, one with data: T and the other with error: { code; message; }.

intermediate2 min read

How would you model a WebSocket message discriminated union in TypeScript?

This tests TypeScript discriminated union narrowing. Define interfaces with readonly literal kind fields, union them, and narrow with switch or if checks. A red flag is typing kind as generic string or using type assertions instead of narrowing.

intermediate2 min read

How would you use an enum to represent API statuses?

What it tests: TypeScript enum runtime behavior and API serialization trade-offs. Strong answer: define a string enum with exact API values, contrast readable wire format vs opaque numeric values.

What are the key differences between NodeList and HTMLCollection?
intermediate2 min read

What are the key differences between NodeList and HTMLCollection?

Tests DOM snapshot vs live binding: querySelectorAll returns a static NodeList, getElementsByTagName returns a live HTMLCollection. Strong answers note childNodes is a live NodeList and warn against caching length during DOM mutation.

Explain DOM event capturing and bubbling with addEventListener
intermediate2 min read

Explain DOM event capturing and bubbling with addEventListener

Tests DOM event propagation and addEventListener phase selection. Core: capture moves root-to-target, bubble moves target-to-root, useCapture or options.capture sets it. Red flag: saying events only bubble or confusing stopPropagation with preventDefault.

Describe event delegation and implement a single ul click handler in TypeScript
intermediate2 min read

Describe event delegation and implement a single ul click handler in TypeScript

Add one listener to the ul, use event.target plus closest to find the li, and type it as MouseEvent.

Describe the difference between DOMContentLoaded and window.load
intermediate2 min read

Describe the difference between DOMContentLoaded and window.load

This tests critical rendering path knowledge. DOMContentLoaded fires after HTML parsing and deferred scripts, while load waits for all subresources; use the former to bind UI early.

intermediate2 min read

Key differences: type alias vs interface for object shapes

Tests your grasp of TypeScript extensibility and declaration merging. Contrast interfaces' extends and open merging against type aliases' unions, intersections, and primitives; prefer interfaces for public APIs and types for unions or mapped types.

intermediate2 min read

How do you type and guard a string-or-string-array argument?

Tests union typing and runtime narrowing. Annotate as string | string[], then branch with Array.isArray(). Strong answers note typeof returns "object" for arrays and that assertions bypass safety.

intermediate2 min read

Explain the difference between any and unknown, and demonstrate type-safe narrowing

This tests your grasp of TypeScript top types: any disables checking while unknown forces narrowing. A strong answer defines both, accepts unknown, and uses typeof or a type guard before operating. Red flag: saying they are equivalent or relying on as casts.

intermediate2 min read

What is noImplicitAny and why is it best practice?

State that noImplicitAny errors when inference fails, forcing explicit types instead of plain any.

intermediate2 min read

Ambient Module Declarations: Compile-Time Trust Falls

Ambient module declarations are compile-time trust falls: you tell TypeScript the shape of code it cannot see. Use them for untyped npm packages, CSS imports, or CDN scripts.

intermediate2 min read

ES Modules in TypeScript: The Compile-Time Contract

TypeScript ES modules are a compile-time target, not a runtime guarantee. Configure this when targeting modern browsers or Node with native ESM. The footgun is omitting .js extensions in imports, which it requires in ESM output even for .ts source files.

Worker postMessage: The Structured Clone Pipe
intermediate2 min read

Worker postMessage: The Structured Clone Pipe

Worker postMessage moves data between threads via structured cloning. Use it to offload heavy work without blocking the UI. The message argument is mandatory, so omitting it is an error and you must pass null when there is no data.

Kent C. Dodds Fixes Accidental Monorepo with Workspaces
intermediate2 min read

Kent C. Dodds Fixes Accidental Monorepo with Workspaces

Kent C. Dodds consolidated four deployable apps into a proper npm workspace, deleting three nested lockfiles and adding minimal Nx caching. The migration exposed hardcoded paths and invalid package aliases that broke production once Node enforced package…

Cloudflare Sandboxes Cut Container Heartbeat Plumbing
intermediate2 min read

Cloudflare Sandboxes Cut Container Heartbeat Plumbing

Kent C. Dodds replaced Cloudflare Containers with Sandboxes, deleting heartbeat and shutdown logic for his FFmpeg pipeline. PR #729 uses one-shot exec() inside the existing queue worker, cutting deploy surface and eliminating long-lived service orchestration.

Kent C. Dodds Adds SQLite FTS5 to Vector Search
intermediate1 min read

Kent C. Dodds Adds SQLite FTS5 to Vector Search

Kent C. Dodds added SQLite FTS5 to Vectorize embeddings after semantic search missed exact matches like "React Testing Library." The hybrid pipeline uses Reciprocal Rank Fusion. If your search fails on API names, add BM25 backup, not bigger embedding models.

intermediate1 min read

Vercel Connect replaces env tokens with runtime OIDC

Vercel Connect Public Beta replaces static env tokens with short-lived, task-scoped credentials exchanged at runtime via OIDC. Agents request least-privilege access per job instead of holding long-lived shared secrets, eliminating manual rotation when…

We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.

See open roles