FA
const channel = Promise.resolve(0)
for await (const something of promises) {
if (some) {
channel.then(x => x + 1)
}
}
const result = await channelSize: a a a
FA
const channel = Promise.resolve(0)
for await (const something of promises) {
if (some) {
channel.then(x => x + 1)
}
}
const result = await channelf
f
f
f
result = 0SS
FA
f
await channel выполнится сразу жеFA
f
for awaitf
f
FA
f
FA
FA
f
SS
f
.then так работаетf
// do something in async loop. Receive messages from network, process them, etc.