DeepFrontend
Practice ArenaBlogSign in
Go Pro
DeepFrontend

Interview-grade learning paths and hands-on practice for mid-to-senior engineers. Master internals, patterns, and system architecture with runnable code.

All systems operational

Core Courses

  • -JavaScript Internals
  • -React Reconciliation
  • -TypeScript rigor
  • -Next.js Caching
  • -Node.js Event Loop
  • -System Design
  • -Web Security
  • -CSS & Page Layouts

Explore

  • Learning Paths
  • Practice Arena
  • Pricing Options
  • HTML Sitemap

Resources

  • Privacy Policy
  • Terms of Service
  • Email Support

© 2026 DeepFrontend. All rights reserved.

Expert learning environments for web engineering teams.

← All challenges
warmup10 min

Implement myCall (Function.prototype.call)

Implement myCall(fn, thisArg, ...args)

Write myCall(fn, thisArg, ...args) that invokes fn with this bound to thisArg and the given arguments — a standalone version of fn.call(thisArg, ...args).

function greet(greeting) { return greeting + ", " + this.name; }
myCall(greet, { name: "Ada" }, "Hello"); // "Hello, Ada"

Hint: the classic trick is to temporarily attach fn as a property of thisArg, call it as a method (which is what makes JS bind this), then remove the property again.

Run your code to see results.

Stuck? This challenge exercises:

javascript.this-binding