RoadmapDay 72 / 80
Interview PrepMonth 4 · Week 15

Day 72: Mock Interview 1: Core JS & React Internals

Run a timed mock covering Month 1-2 internals (event loop, closures, prototypes, Fiber, hooks) with rapid-fire depth, the way a real technical screen runs.

Mark this day complete

Study

Concepts

What this round actually tests

A "JS & React internals" round rarely asks you to write much code — it tests whether your mental model of WHY things work is solid enough to explain and predict behavior under follow-up questions ("what would happen if...", "why does React do it that way instead of..."). The interviewer's follow-ups are often more revealing than the first answer — a senior candidate should be comfortable being pushed one or two levels deeper than their initial answer on any Month 1-2 topic.

Time-box yourself: 45-60 minutes, 6-8 questions pulled from across Days 1-25, answered out loud (not just thought through silently) — silently "knowing" an answer and being able to articulate it clearly and correctly under mild pressure are different skills, and this mock is specifically rehearsing the second one.

See It

Visualizations

Visualization

Mock structure

Warm-up question

e.g. explain hoisting

2-3 "predict the output" snippets

event loop, closures, this

2-3 "why does React do X" questions

Fiber, reconciliation, hooks rules

One deliberate follow-up push per answer

go one level deeper than the first answer

Build It

Code Examples

A self-contained mock question set (answer out loud, then check against your Week 1-5 notes)

text
1. Predict the exact console.log order:
   console.log('a');
   setTimeout(() => console.log('b'), 0);
   Promise.resolve().then(() => console.log('c'));
   console.log('d');

2. Why does this callback lose 'this', and name two fixes:
   class Timer { start() { setTimeout(this.tick, 1000); } tick() { ... } }

3. Explain, precisely, why changing a list's key from index to a
   stable id can fix a bug where the wrong row's input stays focused
   after a reorder.

4. Why is a new inline object passed as Context value a performance
   problem, even if the actual data inside it hasn't changed?

5. Walk through what happens, step by step, when setState is called
   inside a React event handler, from the Fiber render phase through commit.

6. Why can't you call a hook inside an if-statement? What internal
   mechanism does this break?

-> For each, answer out loud in under 90 seconds, then push yourself
   with ONE follow-up ("but what if..." / "why does that matter in practice?").

Remember

Key Takeaways

  • This round tests articulation of WHY, not just recognition — practice explaining out loud, not just recalling silently.
  • Expect and rehearse for follow-up pushes — a senior answer holds up one or two levels deeper than the first response.
  • Time-box the mock realistically (45-60 min, 6-8 questions) to build pacing instincts, not just knowledge.
  • "Predict the output" snippets (event loop, closures, this) are disproportionately common — they compress a lot of signal into one question.
  • If you get a question wrong, note WHICH day's material it maps to and re-review that specific day before the next mock.

Do It

Practice

  1. 1Run the 6-question set above fully out loud, timed, without looking at notes first.
  2. 2For any question you struggled with, re-read that specific Week 1/2/5 day and re-attempt the question 24 hours later.
  3. 3Write 3 NEW "predict the output" snippets of your own, covering topics not in the set above, and solve them cold.