-
Notifications
You must be signed in to change notification settings - Fork 0
this Keyword
Preeti Wadhwani edited this page Jun 11, 2021
·
1 revision
this in js is an object which refers to current execution scope
the execution context is based on the left hand side of the function which means how we calling the method.
- if using object,
this
will refer to that object - if without anything,
this
will refer to global window object
- they don't get their own this access
- this will be identical to the parent function this