Tapas Adhikary
Educator @tapaScript | Founder CreoWis & ReactPlay - Writer - YouTuber - Open Source
Introduction Let me start this article by thanking the readers of my series, JavaScript: Cracking the Nuts for liking and loving it so far. This article will go through another fundamental but equally misunderstood aspect of JavaScript called the th...
blog.greenroots.info10 min read
Hello, I'm learning Javascript from internet and searching answers for knowing how 'this' works in arrow and normal functions get your amazing posts. It all was fine until I get the following part : "What do you think, this would be bound to here inside forEach? It is not an arrow function. It is a regular function, and it has its own execution context. In that execution context, there is nothing called a name. Hence this.name is undefined." Because of in your previous post about binding, the object on which the function is called define the binding of 'this'. So I don't understand which is the Object on which the anonymous function (inside of forEach) is called in this case. It would be good identify that in order to follow the thread of the previous explanations. I am aware of this is 4 year old, and maybe you are in other business, but I get here today and write this question just in any case. Thanks.
Loved your explanation Tapas.
In your code snippet under 'apply() method', shouldn't hobby1 and hobby2 be replaced by hobbies[0] and hobbies[1] respectively?
Uday Tewary
Love Watching Anime and gaining and sharing knowledge
Really beautiful and amazing explanation Tapas Adhikary sir I recently got to know about U when I read ur blog on Promise and it was truly amazing loved ur explanation and it clear very much confusion of mine