2 ms·
That doesn't look like well written async code at all... You're not supposed to use await literally everywhere and especially not multiple times in a single lin
by imtringued 8y ago
That doesn't look like well written async code at all... You're not supposed to use await literally everywhere and especially not multiple times in a single line.
Javascript already has an answer to this (Hint it was inspired by Monads but it isn't one):
await foo.then(f => f.bar()).then(b => b.baz())
- int_19h 8y agoWhat happens if f.bar() throws an exception asynchronously?