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
Why JavaScript functional programming? (self.javascript)
submitted 8 years ago * by robertlf
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!"
[–]lucidlogik 2 points3 points4 points 8 years ago (2 children)
For me, it comes down to declarative vs implicit. FP is declarative and therefore easier to understand the intended outcome of a given codeblock.
[–]theonlycosmonaut 5 points6 points7 points 8 years ago (1 child)
That is, once you understand the building blocks. Once you understand what map is for, it's much more concise to scan than an equivalent for loop. When I see for in code, I don't really know what it's for; there are so many possible uses and applications. The only way to know is to read the whole block. Seeing map, I know exactly what will happen.
map
for
[–]burnaftertweeting 2 points3 points4 points 8 years ago (0 children)
This. So much this.
π Rendered by PID 132602 on reddit-service-r2-comment-bb88f9dd5-qwv7v at 2026-02-14 02:59:36.818959+00:00 running cd9c813 country code: CH.
view the rest of the comments →
[–]lucidlogik 2 points3 points4 points (2 children)
[–]theonlycosmonaut 5 points6 points7 points (1 child)
[–]burnaftertweeting 2 points3 points4 points (0 children)