What Is "this"?

This video will explore how the thiskeyword functions in JavaScript. The most important thing to remember when working with this is what the function containing it is called. The value of thischanges depending on its calling context. For instance, if a function is called without an object reference, then thisrefers to a global variable. On the other hand, if a function is called with an object reference, then this refers to that specific object.


Source: Toseef Zafar, https://www.youtube.com/watch?v=EvMec6J-HIo
Creative Commons License This work is licensed under a Creative Commons Attribution 3.0 License.

Last modified: Monday, August 21, 2023, 11:50 PM