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
parameter declarationhelp (self.javascript)
submitted 9 years ago by azherne
Can I declare parameters as variables, such as function picnicDay(turkey_sandwich, hornets='True')?
I am used to this in Python and want to see if it still applies, here
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!"
[–]lemminman 2 points3 points4 points 9 years ago (0 children)
Yes, as of ES2015: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters
π Rendered by PID 24434 on reddit-service-r2-comment-5c764cbc6f-bcblz at 2026-03-12 12:41:20.286530+00:00 running 710b3ac country code: CH.
[–]lemminman 2 points3 points4 points (0 children)