On Mon, Nov 6, 2017 at 3:23 PM, Jorge Téllez
<[email protected]> wrote:
>
> I would like to propose a new syntax for promises for the next ECMAScript.
We already have a concise syntax for a function that returns a promise:
`async`:
```js
async function promiseFunction() {
// Do work here, throw exception to reject,
// perhaps use `await` to wait for other promises...
return theResult;
};
```
More:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function
-- T.J. Crowder
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss