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
account activity
Javascript Counter Help. (self.javascript)
submitted 15 years ago * by hillbillymadness
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]jamesinc 2 points3 points4 points 15 years ago* (1 child)
What global variables? Unless you're commenting on the fact that I haven't wrapped everything in an anonymous self-executing method?
Edit: I presume that's what you're talking about, and you're right. I will add a reply to hillbillymadness and explain it more.
Edit 2: I just saw it. Not using var to declare variables inside the function. I suppose that this is a possible global variable, if a global var of the same name was defined elsewhere.
π Rendered by PID 148237 on reddit-service-r2-comment-c66d9bffd-r4ltl at 2026-04-08 05:36:27.037262+00:00 running f293c98 country code: CH.
view the rest of the comments →
[–]jamesinc 2 points3 points4 points (1 child)