xxxxxxxxxx
async function fn() {
while (true) {
await new Promise(asyncFn);
}
}
xxxxxxxxxx
const runAsync = () => {
console.log("starting async function")
setTimeout(() => {
let v = runAsync()
console.log("return val", v)
}, 1000)
return "async function return"
}
console.log("return: ", runAsync())