Code
Loading editor...
Tap Analyze to see visualization
Click Analyze to visualize
See step-by-step execution, variables, and output
Variables
Run code to see variables
Output
Console output will appear here
Click Analyze to visualize
See step-by-step execution, variables, and output
Run code to see variables
Console output will appear here
Demonstrate the four rules of this binding: method call (implicit), bind (explicit hard binding), call/apply (explicit), and arrow functions (lexical). Each pattern shows how JavaScript resolves the this reference at the call site.
The value of this is determined by how a function is called, not where it is defined. Arrow functions are the exception: they capture this lexically from their enclosing scope at creation time.
Updated Feb 2026