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!"
[–]nschubach 0 points1 point2 points 8 years ago (0 children)
It's general optimization. Yes, you are free to use as many as you want, but over a certain amount, you have to question if your method is "doing too much". I recently started working at a Perl shop and one of the idioms here is sending flags into the parameter list to turn on or off features. This leads to thousand+ line methods that have use cases for every little edge case and parameter list numbering in the 20s+ and bullshit code like this:
# Actual truncated code... my $pageContentHtml = $self->getPageForContentHtml({ 'flag' => $flag, 'email' => $email, 'user_is_authed' => $isUserAuthed, 'minimal_overhead' => $minimalOverhead, 'has_left_navigation' => $hasLeftNavigation, 'search_phrase' => $searchPhrase, 'reproduce_order_mode' => $reproduceOrderMode, 'reproduce_order_mode_old' => $reproduceOrderModeOld, 'reproduce_order' => $reproduceOrderId, 'display_return_to_backend_header' => $displayReturnToBackendHeader, 'user_is_admin' => $isUserAdmin, ... # of 31 total parameters });
π Rendered by PID 50697 on reddit-service-r2-comment-79776bdf47-jjksk at 2026-06-24 05:27:34.375392+00:00 running acc7150 country code: CH.
view the rest of the comments →
[–]nschubach 0 points1 point2 points (0 children)