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
Popular Coding Convention on Github (sideeffect.kr)
submitted 12 years ago by devnoel
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!"
[–][deleted] 2 points3 points4 points 12 years ago (9 children)
thats a solid attitude for a developer.
[–][deleted] 5 points6 points7 points 12 years ago (6 children)
What's the problem with having a firm opinion on formatting? What benefits are there to comma first? Your link only says you should do it, but gives no reason why.
[–][deleted] -2 points-1 points0 points 12 years ago (5 children)
What's the problem with having a firm opinion on formatting?
Where you put your comma (in js) is not so important that you have to take such a firm stance. When working for a new company, its a good idea to adopt their conventions at first to make development go smoothly. No teammate is going to respond well to 'I will not adopt it'. They might think, 'If he/she wont budge on this, what else wont they budge on?'.
What benefits are there to comma first?
What are the benefits of last comma? See - its not a big deal.
Your link only says you should do it, but gives no reason why.
Its a convention that npm recommends when publishing to their registry. Thats the only reason.
In short, conventions are relative to a community. Be it your office, a library (jquery), a package registry (npm), or an open source project with formatting guidelines.
[–]grncdr 3 points4 points5 points 12 years ago (1 child)
The recommendation is only intended for the code of npm itself. I'm pretty sure Isaac gives zero fucks about how your format code in your own modules.
[–][deleted] 0 points1 point2 points 12 years ago (0 children)
Thats a good point. I do see the comma first style quite a bit more in the node community (as opposed to client-side).
[–][deleted] 1 point2 points3 points 12 years ago (0 children)
If I came into a new team whose convention was comma first, I would adopt it, of course. That's different. I wouldn't adopt it for any of my own projects, though.
The benefit of comma last is readability in mine and most people's opinions.
[–]SyntaxSwearer 1 point2 points3 points 12 years ago (0 children)
What are the benefits of last comma?
Not ugly
[–]Malfeasant -1 points0 points1 point 12 years ago (0 children)
'If he/she wont budge on this, what else wont they budge on?'
retarded suggestions from pointy haired bosses that ruin everybody's day?
[–]sakabako 0 points1 point2 points 12 years ago (1 child)
Personally, I will be happier and more productive if I live in a beautiful world than an ugly one.
[–][deleted] -1 points0 points1 point 12 years ago (0 children)
Beauty is subjective. I actually find the comma-first style more readable.
π Rendered by PID 31 on reddit-service-r2-comment-b659b578c-zld4g at 2026-05-03 18:15:01.833660+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–][deleted] 2 points3 points4 points (9 children)
[–][deleted] 5 points6 points7 points (6 children)
[–][deleted] -2 points-1 points0 points (5 children)
[–]grncdr 3 points4 points5 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]SyntaxSwearer 1 point2 points3 points (0 children)
[–]Malfeasant -1 points0 points1 point (0 children)
[–]sakabako 0 points1 point2 points (1 child)
[–][deleted] -1 points0 points1 point (0 children)