3 ms·
> Hmm, forgot about that style. Where you only have prefix await, .then() can end up nicer Mind that in this example the then is a little nicer only by chance
by johannes1234321 5y ago
> Hmm, forgot about that style. Where you only have prefix await, .then() can end up nicer
Mind that in this example the then is a little nicer only by chance that the continuation is quite trivial. If you'd need something more complex than the single function call it is annoying and if you do any later change to this code, you likely have to change this as well.
I typically go to the multiple lines, but wanted to show that there is a kind-off suffix await.
I am not used to suffix await, as i like to spot the places where i jump out of the coroutine easily. But maybe that would change if I'd use languages with suffix await more :)