5 exercises — choose the best-structured answer to common frontend interview questions. Focus on technical vocabulary, explanation structure, and professional tone.
Structure for technical concept questions
Define: state clearly what the concept is (one sentence)
Explain: describe how it works or why it exists
Example: give a concrete case or code scenario
Insight: add one nuance, edge case, or trade-off to show depth
0 / 5 completed
1 / 5
An interviewer asks: "Can you explain the virtual DOM?" Which answer demonstrates the best technical English?
Option B is the strongest answer: it introduces the term clearly (in-memory representation), names the key process (reconciliation), explains the mechanism (computes the difference), and states the benefit (minimal set of updates, avoiding unnecessary re-rendering). Notice the structure: what it is → how it works → why it helps. Option A is informal ("make things faster"). Option C is vague and grammatically weak. Option D is correct but choppy — short disconnected sentences lack cohesion.
2 / 5
The interviewer asks: "What is CORS and when does it come up?" Choose the most professional and accurate response.
Option C is the best answer: full expansion of the acronym, precise vocabulary (browser-enforced, origins), a concrete example (app.example.com), and the specific HTTP header (Access-Control-Allow-Origin). In interviews, naming the exact mechanism shows depth. Option A is acceptable but informal ("a browser security thing"). Option B is too brief — only two sentences. Option D focuses only on the error symptom and dev workaround, not the concept. Structure to copy: define → when it applies → how it works.
3 / 5
The interviewer asks: "How does the browser render a page?" Which answer best demonstrates structured technical communication?
Option A is the strongest: it lists the steps in the correct order (HTML → DOM → CSS → CSSOM → render tree → layout → paint) and adds a key detail about JavaScript blocking. Good technical explanations in interviews are: ✓ sequential, ✓ use correct terminology, ✓ add one insight that shows depth. Option B is too vague and misses the render pipeline terminology. Option C mentions the terms without explaining the sequence or relationships. Option D is informal and misses key terms like DOM, CSSOM, and render tree.
4 / 5
The interviewer asks: "Can you explain CSS specificity?" Which explanation is clearest and most structured?
Option A is the strongest: it defines the concept (how the browser decides), explains the mechanism (calculated as a score), gives the correct hierarchy in order, and adds the nuance about source order. Option B uses the "points system" analogy which is helpful, but "CSS rules fight" is too informal for a professional interview. Option C is accurate but mentions !important without explaining that it breaks the specificity model — could mislead. Option D is correct but very brief and lacks the full hierarchy. Tip: in interviews, aim for definition → mechanism → example → edge case.
5 / 5
The interviewer asks: "What is event delegation in JavaScript?" Choose the most precise and well-explained answer.
Option B is the best answer: it defines the pattern, names the mechanism (event bubbling), briefly explains what bubbling means (events propagate up the DOM tree), and gives the key use case (dynamically added elements). This shows both breadth and depth. Option A is correct but informal and lacks the "dynamically added elements" insight. Option C is practical and mentions event.target — a good detail — but lacks the formal definition. Option D is correct but does not explain why bubbling works or the dynamic elements advantage. Use option B's structure: pattern name → mechanism → why it works → key use case.