(no title)
mrozbarry | 1 year ago
const myAsyncThing = async (init) => {
let value = await task1(init);
value = await task2(value);
return value;
}
const myPromiseThing = (init) => task1(init).then(task2)
I know this is a relatively simple and contrived example, but there are some times where async/await very much is bulky and gets in the way of just writing code.
THBC|1 year ago
Compare with
Afterwards either try-catch await myPromise, or use myPromise.then().catch()saurik|1 year ago
mrozbarry|1 year ago