Skip to content
tezvyn:

🌐Frontend Dev

Frontend web development and UI engineering

267 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 interview questions in Frontend Dev

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

Compare and contrast Vue 3 and Svelte reactivity systems

Tests runtime versus compile-time trade-offs. Contrast Vue 3 Proxy interception with Svelte compile-time assignment transforms. Vue tracks dependencies dynamically during effects; Svelte resolves them at build. Red flag: claiming both use runtime Proxies.

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.

What is the purpose of React's key prop and index key risks?
intermediate2 min read

What is the purpose of React's key prop and index key risks?

This tests React reconciliation. Keys give stable identity to match components across renders and preserve state. Indices break on reorder or delete, causing state bugs. A red flag: saying keys are only for performance or indices are harmless.

Describe the full CSS cascade precedence order
intermediate2 min read

Describe the full CSS cascade precedence order

This tests deep cascade knowledge beyond specificity. A strong answer lists the six origins in order, notes !important reverses them, then layers, specificity, and source order.

Why is DI central to Angular architecture versus Vue's module system?
intermediate2 min read

Why is DI central to Angular architecture versus Vue's module system?

Tests architectural grasp of inversion of control. Angular DI enables hierarchical injectors, tree-shakable providers, and runtime substitution without direct imports unlike Vue modules. Red flag: calling DI mere convenience or claiming Vue matches Angular DI.

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.

Describe two patterns for conditional rendering in JSX
intermediate2 min read

Describe two patterns for conditional rendering in JSX

First, early return with if/else for branches; second, ternary or logical AND inside JSX for inline toggles.

What is margin collapsing? Give a sibling scenario and prevention.
intermediate2 min read

What is margin collapsing? Give a sibling scenario and prevention.

This tests understanding of vertical margin combination in normal flow. A strong answer defines collapsing, gives a sibling paragraph example where the larger margin wins, and names a block formatting context or padding as prevention.

intermediate1 min read

Pseudo-class versus pseudo-element in CSS

Pseudo-classes target an element in a state, pseudo-elements style a generated or sub-part using double colons, and ::before injects decorative content.

How does Svelte update the DOM without a Virtual DOM?
intermediate2 min read

How does Svelte update the DOM without a Virtual DOM?

This tests compile-time versus runtime framework architecture. A strong answer says Svelte compiles components into imperative JS that surgically updates the DOM when reactive state changes. A red flag is claiming it uses a hidden VDOM or dirty checking.

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.

What is a React Fragment and why use it over a div?
intermediate2 min read

What is a React Fragment and why use it over a div?

This tests JSX semantics and DOM hygiene. A strong answer says Fragments group children without wrapper nodes, preventing extra DOM and invalid HTML like divs in tables. A red flag is citing performance without mentioning DOM structure or semantics.

Explain prop drilling and why it's a problem
intermediate2 min read

Explain prop drilling and why it's a problem

Tests coupling in deep React trees. Good answers define prop drilling as forwarding props through unused intermediaries, cite coupling and refactor pain, and name Context or composition as fixes. Red flag: calling props bad or jumping to Redux without Context.

How is CSS specificity calculated for a complex selector?
intermediate2 min read

How is CSS specificity calculated for a complex selector?

This tests ID-CLASS-TYPE algorithm fluency. A strong answer gives the three-column tally, counts IDs, classes or attributes, and types in order, and notes combinators add zero. A red flag is counting combinators or mixing inline styles into selector scores.

How do you configure Angular CLI dev server proxying?
intermediate2 min read

How do you configure Angular CLI dev server proxying?

Tests Angular CLI proxying to bypass CORS locally. Good answer: create proxy.conf.json with target and path, register it in angular.json serve options as proxyConfig, then restart ng serve.

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.

Explain Vite dependency pre-bundling, startup speed, and CommonJS handling
intermediate2 min read

Explain Vite dependency pre-bundling, startup speed, and CommonJS handling

This tests whether you understand Vite's ESM-first dev server constraints. Pre-bundling converts CJS/UMD to ESM and collapses multi-file ESM deps into single modules to stop 600+ request waterfalls.

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.

What will count be after three setCount calls in a row?
intermediate2 min read

What will count be after three setCount calls in a row?

Tests React state batching and stale closures. Answer: count is 1 because all three calls read the same closed-over value of 0. Fix: pass an updater function setCount(c => c + 1) three times so React queues each update.

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