The this is the final boss of the javascript developers. It's slippery, contaxtual, and changes its meaning based on where it called. Understanding it along with call , apply and bind is the moment where you stop guessing what your code do and stat knowing.
Content List
What this means in JavaScript (simple explanation)
this inside normal functions
this inside objects
What call() does
What apply() does
What bind() does
Difference between call, apply, and bind
What this means in JavaScript (simple explanation)
Think of this as dynamic noune like "i" or "me"
if i say "i am eating" the word "i" refer to me, if you say same sentance then "i" refer to you. The sentace is same but subject is change depending on who is speaking.
In javascript this refer to the object which currently executing the code.…