Faster async functions and promises
https://v8.dev/blog/fast-async
async function computeAnswer() {
return 42;
}
undefined
const p = computeAnswer();
undefined
p.then(console.log);
42
Promise {<resolved>: undefined}
async function foo() {
const v = await 42;
return v;
}
undefined
const p = foo();
undefined
p.then(console.log);
42
Promise {<resolved>: undefined}