Describing Default Binding
- Default binding occurs when
thisis the global context - And
thisis the global object when a function is invoked without either implicit or explicit binding -
Meaning, it is the global object when we aren't using:
- A dot
- The
.call()method - The
.apply()method - The
.bind()method
- The global context is used depending on where we're working
- In the browser,
thiswill be thewindow - In strict mode, the global context is undefined
Illustrating Default Binding
console.log(this);
// Window {parent: Window, opener: null, ...}References
Previous
Next