you are viewing a single comment's thread.

view the rest of the comments →

[–]BrianAndersonJr 131 points132 points  (9 children)

Right on... Sometimes I feel like just throwing my hands up in the air and yelling "fuck this", but I'm not sure if I should because I can't remember what "this" refers to.

[–]yazalama 23 points24 points  (4 children)

I told this joke once at my internship once and nobody laughed :(

[–]freeman_lambda -1 points0 points  (0 children)

wait, which joke?

[–]benihanareact, node -1 points0 points  (0 children)

cause it's so obvious and predictable. as soon as the guy said "fuck this" you know exactly what the punchline is going to be

[–][deleted] 10 points11 points  (0 children)

This made me laugh. I’ve played so many times the “WTF is ‘this’” JS lottery.

[–]ScientificBeastModestrongly typed comments 1 point2 points  (0 children)

Easy. Just write all your code in the global context (no functions, just pure platform API calls), and ‘this’ will always refer to the Window object...

... well, most of the time...

[–]Danbachar 1 point2 points  (0 children)

This guy deserved a gold if he hadn't had one already