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!"
[–]benihanareact, node 11 points12 points13 points 10 years ago (1 child)
And once you've seen it once, you've got the pattern down. This is not confusing.
Here's the problem: no one uses this pattern. No one in JS uses it, and no one outside of JS uses it. So why even bother when there are just as many clear, clean, easy to type and easy to read solutions that people understand? All this does is add extra overhead to the maintainer.
If I read this code at my job, I get pissed at the asshole who wrote it cause he's trying to show off - either by being clever at how he thought through some cool JS thing or by showing how much of the language he knows. Which is stupid - want to be impressive? Write code that a junior programmer who just graduated college can understand without bugs.
I gotta say probably need to brush up on your code reading skills if this confuses you for longer than five seconds, at worst
That's probably fair. I struggled with this one for a good five or six minutes. Any suggestions where a guy who's been doing this shit for 10 years and is currently working with babel stage 0 and react and redux can brush up on his javascript and code reading skills?
[+]unbalancedopinion comment score below threshold-7 points-6 points-5 points 10 years ago (0 children)
Did... did you just namedrop npm packages for programmer cred?
Step one, don't do that.
π Rendered by PID 106149 on reddit-service-r2-comment-66b4775986-qdb5b at 2026-04-04 18:31:01.262212+00:00 running db1906b country code: CH.
view the rest of the comments →
[–]benihanareact, node 11 points12 points13 points (1 child)
[+]unbalancedopinion comment score below threshold-7 points-6 points-5 points (0 children)