Modify Promise.all() to accept an Object as a parameter

Marius Gundersen gundersen at gmail.com
Fri Apr 10 09:24:44 UTC 2015


With destructuring you can do:

```js
let [url, input] = await Promise.all([
  getUrl("home"),
  doUserInput(elem)
]);

redirect(url+"?"+input);
```

Marius Gundersen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150410/546a35ab/attachment.html>


More information about the es-discuss mailing list