DEV Community

loading...

Discussion on: Is there a good temporary variable name that you use?

Collapse
qm3ster profile image
Mihail Malo

Then, in the style of my other answer:

async function getAllFooBar() {
  const all = []
  for await (const foo of getPaged('foo'))
    for await (const x of getPaged('bar', foo))
      all.push(x)
  return all
}
Enter fullscreen mode Exit fullscreen mode
Thread Thread
klvenky profile image
venkatesh k Author

Yep. That looks great. thanks.