๐Ÿ‘†

this Binding Simulator

new ยท implicit ยท default ยท arrow ยท lost
Code Editor
Example:
Speed:500ms/step
idle
Console
Console output will appear here.

5 Rules of this Binding

๐ŸŸฃ

new Binding

new creates a new object and binds it to this

๐Ÿ”ต

Implicit

obj.method() call makes obj the this

โšช

Default

Standalone call: this = undefined (strict mode)

๐ŸŸก

Arrow Function

Arrow function inherits this from outer scope

๐Ÿ”ด

Lost Binding

Extracting a method loses its this binding

new BindingImplicitDefaultArrow FunctionLost Binding

Press โ–ถ Run or Step to begin