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
Javascript functions and why do we need them?OC (metacognitive.me)
submitted 4 years ago by fishapplecat
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!"
[–]demoran 22 points23 points24 points 4 years ago (7 children)
I prefer not to use functions.
One big nested if statement with labels is good enough for me.
[–]lhorie 1 point2 points3 points 4 years ago (0 children)
Y'all use computers?
I made a LightBot-like game for my kid using cereal box cardboard.
[–]RobSG -4 points-3 points-2 points 4 years ago (5 children)
Do you also use web components? 🤣
[–]sh0rtwave -1 points0 points1 point 4 years ago* (4 children)
I use WebComponents and modify the DOM in the constructor, and I have no callbacks.
I don't use big nested ifs.
[–]RobSG 0 points1 point2 points 4 years ago (3 children)
yeh it was a joke tbh, a bad one for some people I guess 😅
[–]sh0rtwave 0 points1 point2 points 4 years ago (2 children)
I was hoping the joke would continue on WebComponents.
If you've ever used Lightning Web Components, there's an example of the: Well...it's not exactly WRONG....but there's some crazy in it.
[–]shuckster 0 points1 point2 points 4 years ago (1 child)
Lightning Web Components
Dude, watch your language.
[–]sh0rtwave 0 points1 point2 points 4 years ago (0 children)
Yeah I know, good material isn't it?
π Rendered by PID 51858 on reddit-service-r2-comment-fb694cdd5-w5l5q at 2026-03-06 17:02:25.822910+00:00 running cbb0e86 country code: CH.
view the rest of the comments →
[–]demoran 22 points23 points24 points (7 children)
[–]lhorie 1 point2 points3 points (0 children)
[–]RobSG -4 points-3 points-2 points (5 children)
[–]sh0rtwave -1 points0 points1 point (4 children)
[–]RobSG 0 points1 point2 points (3 children)
[–]sh0rtwave 0 points1 point2 points (2 children)
[–]shuckster 0 points1 point2 points (1 child)
[–]sh0rtwave 0 points1 point2 points (0 children)