Why not just use a combination of `async`/`await` and `.then`?
```javascript
async function initialize() {
const [foo, bar, baz] = await Promise.all([
request('foo.json').then(t => t.data),
request('bar.json').then(t => t.data),
request('baz.json').then(t => t.data),
Now how does this get to becoming a proposal? Is there a TC39 member that
has seen this and will introduce it to the committee?
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
Isiah, thank you for composing this proposal.
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
JS needs a modulo operator. It currently has the remainder operator `%`
which works in most cases except for negative values. I believe the the
`%%` would work great and be easy to remember.
let x = (-13) %% 64;
is equivalent to
let x = ((-13 % 64) + 64) % 64;
4 matches
Mail list logo