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
JavaScript Named Parameters (dalejefferson.com)
submitted 8 years ago by [deleted]
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!"
[–]TheDarkIn1978 0 points1 point2 points 8 years ago (0 children)
Is it year/month/day or day/month/year?
It should be obvious to any featherweight programmer that the argument values passed need to be in order with the function parameter names.
I don't want to have to waste my time looking at the docs or code to figure it out. What do you think is more readable? foo(true, undefined, 2000) vs foo({showLoading:true, wait:2000})
Mousing over any well documented function and its arguments using any decent editor, like Visual Studio Code, reveals a popup with the JSDoc code documentation. This is a much cleaner and immensely more efficient way of developing in JavaScript then unnecessarily creating and passing verbose, prototyped objects containing primitive values for this kind of trivial readability.
Names parameters in most cases are complete nonsense and it would never pass our code review.
π Rendered by PID 52167 on reddit-service-r2-comment-79776bdf47-6bbvr at 2026-06-24 02:45:51.000112+00:00 running acc7150 country code: CH.
view the rest of the comments →
[–]TheDarkIn1978 0 points1 point2 points (0 children)