Skip to main content
JavaScript Interview Questions Predict Output P0 Hard

Arrow receiver vs a bound normal function

Trace which call controls this in each case.

Official Reference

Code Snippet

function makeReaders() {
  const arrow = () => this.city;
  const normal = function () { return this.city; };
  return [arrow, normal.bind({ city: "Pune" })];
}
const [a, b] = makeReaders.call({ city: "Nagpur" });
console.log(a.call({ city: "Delhi" }));
console.log(b.call({ city: "Delhi" }));

Expected Output & Explanation

Nagpur
Pune

The arrow uses the this of makeReaders. The normal function’s bound receiver wins over a later explicit receiver supplied to the bound wrapper.

Module Context & References

JavaScript · Language output drills Trace closures, receivers, prototypes, coercion and array edge cases
Personal Notes · Markdown

Technologies & Interview Topics Covered

Switch between short-term interview tracks and long-term 80/20 engineering depth to practice JavaScript internals, React rendering and hooks, timed frontend machine coding UI challenges, MeetaPro FG300, Blind 75 & NeetCode 150 DSA patterns, Python & FastAPI APIs, PostgreSQL query optimization & MVCC, Redis caching, Applied AI RAG pipelines & evaluations, and distributed system design.