Question: does your book demystify the nature of "this" keyword in JS ? I came from the Java world, and now struggle to wrap my mind about this conception. While Java's "this" feels natural and straightforward to me, JS's "this", as I learned from various Medium articles, might have different meanings depending on "environment" or something...
I'm both new to JS and impatient (well, who is not these days?), and love paper books. Thanks for the opportunity to participate in the draw.
the book does one better than that. It tells you NEVER TO USE this except when implementing a method. Don't use this. Use arrow functions for everything other than methods. And you never need to debug problems caused by this.
Of course, the book also explains how "this" works. But really, don't use it outside methods. For example, I see people use
Now you have to understand how this got bound. Is "this" really a reference to the checkbox? How did that happen? You really have to think about it--it is not obvious.
It is trivial to avoid that mental load: