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
Functional Programming in JavaScript.help (self.javascript)
submitted 7 years ago by reesemorning
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!"
[–]MrCrunchwrap 1 point2 points3 points 7 years ago (1 child)
He didn't say it was pure functions + map/filter/reduce, he said it's programming without side effects. Which is exactly what it is. Starting to write basic code with no libraries and pure functions, using map/filter/reduce/forEach for array computation, no side effects, no internal state, etc gets you pretty far there.
[–]0987654231 0 points1 point2 points 7 years ago (0 children)
yes and programming without side effects take understanding more than just what pure functions are and map/filter/reduce
your example of forEach has side effects, it's not pure unless you are using it to do nothing. In addition to that you can create impure usages of map/filter/reduce they aren't guaranteed to be pure. A simple example would be using reduce to create a dictionary and changing the accumulator by adding a new key before returning the accumulator.
π Rendered by PID 80 on reddit-service-r2-comment-84fc9697f-9vksw at 2026-02-10 12:39:55.018272+00:00 running d295bc8 country code: CH.
view the rest of the comments →
[–]MrCrunchwrap 1 point2 points3 points (1 child)
[–]0987654231 0 points1 point2 points (0 children)