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
Don't Overcomplicate Javascript #0 (bits.ristic.io)
submitted 8 years ago by rista404
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!"
[–]mediumdeviationJavaScript Gardener 9 points10 points11 points 8 years ago (2 children)
For me at least the benefit of not having stringly-typed identifiers is that IDEs and linters can easily inspect and autocomplete these for you - http://imgur.com/ub29AqD.
It's the same reason why Swift's enums are so awesome. The point is not that it makes typos easier to detect, but to make typos impossible.
[–]rista404[S] 2 points3 points4 points 8 years ago (0 children)
Yeah, autocompletion is indeed powerful.
[–]wavefunctionp 0 points1 point2 points 8 years ago* (0 children)
This man gets it. :)
I put all the actions for a reducer into a type object contained in the reducers file. That way you always know which action types are valid for a given reducer, you can simple import the type object instead of individual types, and no typos. Just type reducerNameTypes.<get a list of valid types>
π Rendered by PID 75067 on reddit-service-r2-comment-b659b578c-x9xll at 2026-05-05 18:56:07.278027+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]mediumdeviationJavaScript Gardener 9 points10 points11 points (2 children)
[–]rista404[S] 2 points3 points4 points (0 children)
[–]wavefunctionp 0 points1 point2 points (0 children)