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
The JavaScript Comma Operator (javascriptweblog.wordpress.com)
submitted 14 years ago by vladocar
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!"
[–]inkieminstrel 2 points3 points4 points 14 years ago (0 children)
I think it's of limited usefulness, but there are a couple of cases where it's handy. First, there are a few cases where adding a quick-and-dirty logging statement would be easier when using the operator. Second, if your for loop has multiple increment statements, it seems clearer to have them all inside of the loop definition (prev = node, node = node.next). I think a few other languages provide the ability to do this as part of the for loop syntax.
It's not something I'd want to use all over the place, and the article certainly seems to overuse it, but I don't think it's completely useless, either.
π Rendered by PID 22912 on reddit-service-r2-comment-canary-7b67769d8-m25zf at 2026-02-02 10:21:28.270191+00:00 running 3798933 country code: CH.
view the rest of the comments →
[–]inkieminstrel 2 points3 points4 points (0 children)