You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* in your own words. explain the four principle for the "this" keyword below.
*
* 1. Whenever a function is in the global scope, the this inside of the function will refer to the window object.
* 2. Whenever a function is called before a dot use this as the object.
* 3. When a constructor is used (this) is the instance of the object within that constructor like within new the this is a new object within the function.
* 4. When Javascript uses call or apply, this is defined explicitly.
*
* write out a code example of each explanation above