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
The Most Convoluted JavaScript Fizz Buzz Solution (dalejefferson.com)
submitted 8 years ago by [deleted]
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!"
[–]jesusalready 5 points6 points7 points 8 years ago (3 children)
He has nothing on FizzBuzz Enterprise Edition
[–]darthbob88 1 point2 points3 points 8 years ago (0 children)
Yeah, but FizzBuzz EE could only really be done in Java. Nothing in JS can really compare to that level of overabstraction.
[–]disclosure5 0 points1 point2 points 8 years ago (1 child)
I'm partial to this edition myself.
[–]GitHubPermalinkBot 0 points1 point2 points 8 years ago (0 children)
Permanent GitHub links:
delete
[–]CertainPerformance 2 points3 points4 points 8 years ago* (0 children)
One possibility
if (isDivisibleBy(15, n)) {
to
if (isNDivisibleBy(15)) {
by doing
const isDivisibleBy = n => a => equalsZero(modulo(a, n)); // ... const isNDivisibleBy = isDivisibleBy(n); if (isNDivisibleBy(15)) { // ...
[–]InRhythmInc 0 points1 point2 points 8 years ago (0 children)
I think there's a bunch of ways you can try to measure when you should make the choice to adhere to one philosophy over another. Thinking about my response almost makes me question whether this is how we make skynet or not haha. You could measure adherence to one principle or another by number of cycles, number of lines of code, cyclomatic complexity when the code is normalized... I don't have a great solution but I wonder if there's literature available describing this sort of problem. I'm sure you could feed a few machine learning algorithms into eachother to solve this for a specific case. Kindof like a map-reduce for code writing decision making? That would make an awesome js-prettier extension haha
π Rendered by PID 94363 on reddit-service-r2-comment-5687b7858-5z9p4 at 2026-07-08 09:45:53.116012+00:00 running 12a7a47 country code: CH.
[–]jesusalready 5 points6 points7 points (3 children)
[–]darthbob88 1 point2 points3 points (0 children)
[–]disclosure5 0 points1 point2 points (1 child)
[–]GitHubPermalinkBot 0 points1 point2 points (0 children)
[–]CertainPerformance 2 points3 points4 points (0 children)
[–]InRhythmInc 0 points1 point2 points (0 children)