Skip to content

Interview guides / FREE RESOURCE

Frontend interview guide

Practice explaining browser behavior, JavaScript and accessible interfaces with answer outlines.

2026 edition · By EgoTECH · No login required
← All interview guides

Practice out loud first. Then compare your answer with the outline. These are original practice prompts, not leaked employer questions.

A 30-minute practice session

Use 5 minutes for a project introduction, 15 minutes for three questions, 5 minutes for follow-ups and 5 minutes for feedback. Score clarity, correctness and concrete evidence from 0–2 each. This is self-review, not an employer score.

Question 1

What makes HTML semantic?

Reveal answer guide

Elements communicate purpose: a button performs an action, an anchor navigates, and headings describe document structure. Native semantics improve keyboard and assistive-technology behavior.

Follow-up: Replace a clickable div with a button and explain the keyboard difference.

Question 2

How do you debug a broken responsive layout?

Reveal answer guide

Reproduce at the failing width, inspect computed styles, find fixed widths or overflow, and check long content. Fix the cause before adding a breakpoint.

Follow-up: What happens when the user zooms to 200%?

Question 3

What is the difference between let and const?

Reveal answer guide

Both are block-scoped. const prevents reassignment of the binding, not mutation of the referenced object. Use const when the binding does not need reassignment.

Follow-up: Can a const array receive a new item?

Question 4

How do you handle a failed fetch?

Reveal answer guide

Catch network failures, inspect response.ok for HTTP errors, validate the response shape, and present a retry path. Abort stale requests where appropriate.

Follow-up: Why can a 404 response still resolve the fetch promise?

Question 5

When should state be derived?

Reveal answer guide

Calculate filtered results from source data and the filter instead of storing a second independently updated list. This avoids inconsistent copies.

Follow-up: When would memoization be useful, and when is it unnecessary?

Question 6

How would you test an event filter?

Reveal answer guide

Cover matching, no match, mixed case, empty data and clearing the filter. Assert user-visible results rather than implementation details.

Follow-up: How would keyboard-only users operate it?

Question 7

What causes an XSS vulnerability?

Reveal answer guide

Untrusted content interpreted as markup or script can execute in the page. Render plain text with textContent; sanitize intentionally allowed HTML with a maintained approach.

Follow-up: Why is client-side input validation alone insufficient?

Question 8

How do you review AI-generated code?

Reveal answer guide

Verify the behavior and API assumptions, inspect dependencies and security boundaries, add meaningful tests and ensure you can explain the change.

Follow-up: Show a case where a plausible implementation fails.

Notes save on this device. Avoid entering passwords or sensitive information.

Keep exploring

Interview guides

Backend interview guide

Practice HTTP, database, authorization and reliability questions using concrete examples.

Open resource
Interview guides

QA interview guide

Answer practical test design, defect reporting and automation questions with evidence.

Open resource