3 ms·
It's only upon reflecting upon "this" recently that I realized that it is (effectively) a global (thread-local) variable set by the X.Y() syntax. (I mean, I und
by lomnakkus 13y ago
It's only upon reflecting upon "this" recently that I realized that it is (effectively) a global (thread-local) variable set by the X.Y() syntax. (I mean, I understood to be the case, but I just didn't realize the impliciations for understanding "this".)
The ECMAScript committe are taking steps to make "this" more useful, but the current semantic is so insane that I don't it's particularly surprising that people who aren't language lawyers don't understand it.
(*) Given that Javascript uses a single-threaded model.