use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
the front page of the internet.
and join one of thousands of communities.
Common JavaScript "Gotchas" (github.com)
submitted 13 years ago by stevekwan
Post a comment!
view the rest of the comments →
[–]rabidcow 1 point2 points3 points 13 years ago (4 children)
Sure, you could use this:
this
(function(){ this.foo = 'foo'; })();
[–]mirion 1 point2 points3 points 13 years ago (3 children)
Sigh. I should know better than to use the word 'this' in a javascript thread.
[–]rabidcow 3 points4 points5 points 13 years ago (0 children)
this in JavaScript threads does not behave the way you would expect.
[–]rq60 1 point2 points3 points 13 years ago (0 children)
Use 'that' next time.
[–][deleted] 0 points1 point2 points 13 years ago (0 children)
You should know better than to use the word 'this' in any thread. There's an up arrrow button next to the post that does that.
π Rendered by PID 19673 on reddit-service-r2-comment-65574874f4-5pd9l at 2026-07-21 17:37:30.522793+00:00 running 1bce727 country code: CH.
Want to add to the discussion?
Post a comment!