Thank you Sergio!
Yes of course..! I don't mention how or when "this" is created. Just stating the fact that every object has a "this" assigned to it!
The value of "this" might be anything within the context that is created. Of course you can change that with the methods mentioned in this article ;)
Every object doesn't have a 'this' assigned to it.
The 'this' is related to the execution context. And the execution context means how a function is called.
That's why I mentioned that a 'this' variable is created when a new execution context is created. :)
As I've already mentioned in the article....I don't go into much details about "this" and
the execution context. The purpose of this article is for a beginner to have a basic understanding of how call, apply and bind works. Saying that every object or function has it's own "this" keyword/variable/object (say it however you want) is enough to make someone understand the basics. Maybe I'll write an advanced article on these concepts next time.
thanks again for the feedback Sergio.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice work Alex.
A small correction upon the 'this' keyword.
A 'this' variable is created when a new execution context is created. And its value it might be anything.
Thank you Sergio!
Yes of course..! I don't mention how or when "this" is created. Just stating the fact that every object has a "this" assigned to it!
The value of "this" might be anything within the context that is created. Of course you can change that with the methods mentioned in this article ;)
Sorry, I did not make it clear.
Every object doesn't have a 'this' assigned to it.
The 'this' is related to the execution context. And the execution context means how a function is called.
That's why I mentioned that a 'this' variable is created when a new execution context is created. :)
As I've already mentioned in the article....I don't go into much details about "this" and
the execution context. The purpose of this article is for a beginner to have a basic understanding of how call, apply and bind works. Saying that every object or function has it's own "this" keyword/variable/object (say it however you want) is enough to make someone understand the basics. Maybe I'll write an advanced article on these concepts next time.
thanks again for the feedback Sergio.