The following JavaScript causes the runtime to hang on Chrome (v80.0.3987.116) and Firefox (v72.0.2) on OSX 10.15.2.
Why?
Note that I am marking the iterator function as async
.
const iterable = { async *[Symbol.iterator]() { yield 'one' }}console.log([...iterable])