This is nuts. Learning the properties of the language is part of the deal. Rules of using this are not hard and actually pretty straightforward. We'd be better off focusing on real world problems instead fixing imaginary "DnD rules".
Cofounded Host Collective (DiscountASP.net). Cofounded Player Axis (Social Gaming). Computer Scientist and Technology Evangelist with 20+ years of experience with JavaScript!
If people actually understood the rules of this, Classes wouldn't have been added into JavaScript. This confuses many people as they expect them to work the same way they do in other OO languages like C#.
nothis is not cosmetic. This solves real world problems, like never having to debug this.
Every dev I know has written console.log(this) to debug this. What if you never had to... ever again...?
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.
This is nuts. Learning the properties of the language is part of the deal. Rules of using
this
are not hard and actually pretty straightforward. We'd be better off focusing on real world problems instead fixing imaginary "DnD rules".If people actually understood the rules of this, Classes wouldn't have been added into JavaScript. This confuses many people as they expect them to work the same way they do in other OO languages like C#.
nothis
is not cosmetic. This solves real world problems, like never having to debugthis
.Every dev I know has written
console.log(this)
to debug this. What if you never had to... ever again...?