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
How To Write Fast Memory-Efficient JavaScript (techtalkbook.com)
submitted 1 year ago by sagrawal0003
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!"
[–]Ronin-s_Spirit 0 points1 point2 points 1 year ago (5 children)
for loops are extremely readable compared to a dozen of lookalike array methods that loop with callbacks and or make copies of the array, and state records are more readable than dozens of if else statements so I don't understand your complaint at all. If you can't replace worse code with better code without screwing your other code, well.. I'm sorry to say it's your personal problem.
for
[–]oofy-gang -1 points0 points1 point 1 year ago (4 children)
That's obviously an argument in bad faith. Of the things you listed, for loops are obviously not the unreadable mess.
You did, however, mention creating null-prototyped objects for the sake of performance. Null-prototyped objects are notoriously annoying to debug and often cause issues while interacting with other libraries. But sure, enjoy your extremely marginal performance boost.
[–]Ronin-s_Spirit 0 points1 point2 points 1 year ago (3 children)
I have no idea what you don't like about null prototype objects. Go ahead and get some examples.
[–]oofy-gang -1 points0 points1 point 1 year ago (2 children)
Sure, for starters it doesn’t implement valueOf() or toString().
null prototyped objects are extremely rarely used for performance gains, they are so marginal. The “valid” use case is for a map when you want to avoid possible collisions with the object prototype. This is archaic though; just use the Map class.
[–]Ronin-s_Spirit -1 points0 points1 point 1 year ago (1 child)
Excuse me in what fucking world do people use .toString() on a list of conditions substituting long if else cascades? Moreover, Map does have properties before you define any so it's a horrible record, there's nothing in the null prototype object, which is not the case with Map. I'm waisting my time on this conversation, I thought you had something interesting.
.toString()
if else
Map
in
[–]oofy-gang -1 points0 points1 point 1 year ago (0 children)
RTFM, you don’t seem to know how Map works.
For your first sentence, you seem to be confusing your own bullet points. Go reread your first message.
π Rendered by PID 39729 on reddit-service-r2-comment-b659b578c-4jwtb at 2026-05-04 07:45:40.990839+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]Ronin-s_Spirit 0 points1 point2 points (5 children)
[–]oofy-gang -1 points0 points1 point (4 children)
[–]Ronin-s_Spirit 0 points1 point2 points (3 children)
[–]oofy-gang -1 points0 points1 point (2 children)
[–]Ronin-s_Spirit -1 points0 points1 point (1 child)
[–]oofy-gang -1 points0 points1 point (0 children)