What Is "this"?
This video will explore how the this
keyword functions in JavaScript. The most important thing to remember when working with this
is what the function containing it is called. The value of this
changes depending on its calling context. For instance, if a function is called without an object reference, then this
refers 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
This work is licensed under a Creative Commons Attribution 3.0 License.
Last modified: Monday, August 21, 2023, 11:50 PM