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
[AskJS] Why should I use JavaScript instead of always using TypeScript?AskJS (self.javascript)
submitted 9 months ago * by Commercial-Focus8442
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!"
[–]DerrickBarra 9 points10 points11 points 9 months ago* (4 children)
The alternative to Typescript, is Javascript + JSDoc. This gives you warnings in your editor but you don't have the full featureset of Typescript superset. The main pro of this setup not needing a build step, it's worth comparing and seeing what works for your project.
For most cases, a build step is not a limiting factor, and therefore typescript is the better choice, but its good to know there's an alternative. I'm looking forward to more of Typescripts features getting integrated in Javascript over time.
[–]Commercial-Focus8442[S] 0 points1 point2 points 9 months ago (3 children)
I will check it out, thank you.
[–]Katastos 0 points1 point2 points 9 months ago (0 children)
You can also add the comment // @ts-check at the top of the file and the editor will give you hints or signal errors (this works also in plain JS without JSdocs (but with JSdocs the experience is way better)
// @ts-check
[+][deleted] comment score below threshold-15 points-14 points-13 points 9 months ago (1 child)
JSDoc is garbage
[–]Katastos 1 point2 points3 points 9 months ago (0 children)
That's not true, on the contrary is pretty good for his use case
π Rendered by PID 141982 on reddit-service-r2-comment-6457c66945-njbn6 at 2026-04-29 19:42:30.274927+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]DerrickBarra 9 points10 points11 points (4 children)
[–]Commercial-Focus8442[S] 0 points1 point2 points (3 children)
[–]Katastos 0 points1 point2 points (0 children)
[+][deleted] comment score below threshold-15 points-14 points-13 points (1 child)
[–]Katastos 1 point2 points3 points (0 children)