Simo Costa (2019-04-01T10:59:54.000Z)
Currently the following illustrative syntax is forbidden:
```js
obj = {
    async*[Symbol.asyncIterator]() {
        const res = await yield;
        // do stuff with res
     }
}
```
Used in this way (simple example):
```js
const ait = [Symbol.asyncIterator]();

ait.next();
ait.next(p); // p is a Promise
```

We cannot directly write `await yield`. Is there any particular reason?
We have to write:
```js
obj = {
    async*[Symbol.asyncIterator]() {
        const p = yield;
        const res = await p;
        // do stuff with res
     }
}
```




<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Mail
priva di virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20190401/14018efb/attachment.html>
andrysimo1997 at gmail.com (2019-04-01T13:04:37.985Z)
Currently the following illustrative syntax is forbidden:
```js
let obj = {
    async*[Symbol.asyncIterator]() {
        const res = await yield;
        // do stuff with res
     }
}
```
Used in this way (simple example):
```js
const ait = obj[Symbol.asyncIterator]();

ait.next();
ait.next(p); // p is a Promise
```

We cannot directly write `await yield`. Is there any particular reason?
We have to write:
```js
let obj = {
    async*[Symbol.asyncIterator]() {
        const res = await (yield);
        // do stuff with res
     }
}
```
andrysimo1997 at gmail.com (2019-04-01T12:44:59.076Z)
Currently the following illustrative syntax is forbidden:
```js
let obj = {
    async*[Symbol.asyncIterator]() {
        const res = await yield;
        // do stuff with res
     }
}
```
Used in this way (simple example):
```js
const ait = obj[Symbol.asyncIterator]();

ait.next();
ait.next(p); // p is a Promise
```

We cannot directly write `await yield`. Is there any particular reason?
We have to write:
```js
let obj = {
    async*[Symbol.asyncIterator]() {
        const p = yield;
        const res = await p;
        // do stuff with res
     }
}
```
andrysimo1997 at gmail.com (2019-04-01T11:13:50.305Z)
Currently the following illustrative syntax is forbidden:
```js
obj = {
    async*[Symbol.asyncIterator]() {
        const res = await yield;
        // do stuff with res
     }
}
```
Used in this way (simple example):
```js
const ait = obj[Symbol.asyncIterator]();

ait.next();
ait.next(p); // p is a Promise
```

We cannot directly write `await yield`. Is there any particular reason?
We have to write:
```js
obj = {
    async*[Symbol.asyncIterator]() {
        const p = yield;
        const res = await p;
        // do stuff with res
     }
}
```
andrysimo1997 at gmail.com (2019-04-01T11:06:49.634Z)
Currently the following illustrative syntax is forbidden:
```js
obj = {
    async*[Symbol.asyncIterator]() {
        const res = await yield;
        // do stuff with res
     }
}
```
Used in this way (simple example):
```js
const ait = [Symbol.asyncIterator]();

ait.next();
ait.next(p); // p is a Promise
```

We cannot directly write `await yield`. Is there any particular reason?
We have to write:
```js
obj = {
    async*[Symbol.asyncIterator]() {
        const p = yield;
        const res = await p;
        // do stuff with res
     }
}
```