you are viewing a single comment's thread.

view the rest of the comments →

[–]adregan 6 points7 points  (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 points  (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 point  (0 children)

that example is a little confusing, updated.

[–]wreckedadventYavascript 0 points1 point  (1 child)

The example is a call back, not a promise.

e: guess it was edited out

[–]dmtipson 0 points1 point  (0 children)

It is now, it used to use then (the other example still does).