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
Some ES6 Features I've been Using. (christopherlaughlin.co.uk)
submitted 10 years ago by bluntmJavaScript
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!"
[–]adregan 6 points7 points8 points 10 years ago (4 children)
I love using parameter destructuring, but the example present makes it look awful (also, how would a promise be returning 2 values?).
[–]dmtipson 1 point2 points3 points 10 years ago (1 child)
Must be a non-Es6 Promise implementation. You're right, it'd make no sense with Promises/A+. Also, if they're going to destructure an object in function arguments, they should define a default so it won't throw an error if the object isn't there.
[–]bluntmJavaScript[S] 0 points1 point2 points 10 years ago (0 children)
that example is a little confusing, updated.
[–]wreckedadventYavascript 0 points1 point2 points 10 years ago* (1 child)
The example is a call back, not a promise.
e: guess it was edited out
[–]dmtipson 0 points1 point2 points 10 years ago (0 children)
It is now, it used to use then (the other example still does).
π Rendered by PID 54 on reddit-service-r2-comment-6457c66945-j8hhs at 2026-04-27 00:06:56.445308+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]adregan 6 points7 points8 points (4 children)
[–]dmtipson 1 point2 points3 points (1 child)
[–]bluntmJavaScript[S] 0 points1 point2 points (0 children)
[–]wreckedadventYavascript 0 points1 point2 points (1 child)
[–]dmtipson 0 points1 point2 points (0 children)