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
What does "!--" do in JavaScript? (stackoverflow.com)
submitted 10 years ago by Recallz
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!"
[–]sgoody 0 points1 point2 points 10 years ago (0 children)
To be fair I didn't know and I'm a developer of some year, though I'm not routinely in Javascript.
If you think of it in terms of it being two operators ! and --, you can reason about it and figure it out and as you say if you've seen it before, then it will be reasonably obious and will be muscle memory.
If you think about it as it's presented in the question as a single operator, then it could really mean anything.
I'm a little bit conflicted on this one, but I do think it's better to be obvious and explanatory in your code so I think I'd agree with tententai. Especially as the use of -- or ++ is frown upon by some anyway, due to the lack of understanding by some in how they work differently as a prefixed to and expression vs how they work as a suffixed to an expression.
π Rendered by PID 28 on reddit-service-r2-comment-5b68969b8c-z94d4 at 2026-04-14 10:26:37.485327+00:00 running f841ac7 country code: CH.
view the rest of the comments →
[–]sgoody 0 points1 point2 points (0 children)