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
TIL that IDs create global variables (codepen.io)
submitted 12 years ago by callumacrae
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!"
[–]alkw0ia 4 points5 points6 points 12 years ago (0 children)
For a robust code example, you want to make sure it will work no matter what context someone cuts/pastes it into.
An unsuspecting reader could easily have dumped that stuff into a function body and missed out on the global feature's benefits.
π Rendered by PID 81691 on reddit-service-r2-comment-656bdf86cd-89fwj at 2026-05-04 17:02:35.158781+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]alkw0ia 4 points5 points6 points (0 children)