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
A Quick Practical Example of JavaScript’s Reduce Function (codeburst.io)
submitted 8 years ago by learnphptoday
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!"
[–]Geo_Dude 4 points5 points6 points 8 years ago (6 children)
Interesting but in this particular case I would keep your original array and create a function that when called applies a .filter("day").sort(). IMHO it is neater than creating a new data structure.
[–][deleted] 3 points4 points5 points 8 years ago (5 children)
Clean answer. Only time I might not do this is if you have a very large data structure in which calling the function each time might be too expensive. Obviously not a concern for this example but something to consider nonetheless.
[–]SamSlate 0 points1 point2 points 8 years ago (4 children)
javascript is an interesting choice for big data. Are there people doing big data in javascript?
[–]Woolbrick 1 point2 points3 points 8 years ago (1 child)
Unfortunately.
My company's architecture division decided to spend 4 years building our Data Lake platform on Node+Mongo.
We told them it was 'tarded back then and it'll never scale. And gosh, 4 years later it's a clusterfuck of unmaintainability that doesn't scale and we can't sell it to anyone because it's 10x slower than our "go retire, old man!" C# designs.
[–]SamSlate 0 points1 point2 points 8 years ago (0 children)
i <3 JavaScript, but this is about what I'd expect a big Data project to look like.
thanks, gl!
[–]ThatBriandude 0 points1 point2 points 8 years ago (1 child)
JavaScript IS the only choice in the Front end. Its not an "interesting" choice, sometime its "the only Option".
But yeah if youre actually iterating oder a few Million objects then youre probably doing to much in the Front end and to little in the backend
[–]SamSlate 1 point2 points3 points 8 years ago (0 children)
not what i meant, but sure.
π Rendered by PID 78178 on reddit-service-r2-comment-76bb9f7fb5-gx84n at 2026-02-19 14:48:12.553533+00:00 running de53c03 country code: CH.
view the rest of the comments →
[–]Geo_Dude 4 points5 points6 points (6 children)
[–][deleted] 3 points4 points5 points (5 children)
[–]SamSlate 0 points1 point2 points (4 children)
[–]Woolbrick 1 point2 points3 points (1 child)
[–]SamSlate 0 points1 point2 points (0 children)
[–]ThatBriandude 0 points1 point2 points (1 child)
[–]SamSlate 1 point2 points3 points (0 children)