Ways "this" keyword is set

PHOTO EMBED

Thu Dec 28 2023 04:40:14 GMT+0000 (Coordinated Universal Time)

Saved by @Marcelluki

There are 4 ways the value of this is set inside functions, depending on the makeup:

1. A simple function call, like the kind you learned about in our earliest JavaScript chapters
2. When calling a function as an object method
3. Explicit binding by using the call(), apply(), and bind() methods
4. When the function is used as a constructor, using the new operator
content_copyCOPY

https://tripleten.com/trainer/web/lesson/93c89dbd-3e69-429b-82bb-f3553357355f/