this is an important topic for JavaScript developers. So what is this😅??

this is a special keyword that is created for every execution context.I will cover execution context,call stack,memory heap in my future posts.

this is not static i.e it changes depending upon the place where it is used.In most cases,value of this is determined by how function is called

Global context

In the global execution context i.e outside of any function this refers to global object which is window in case of browsers.

console.log(this) //Window
this === window //true

#javascript #programming

Understanding this in JavaScript
2.55 GEEK