According MDN Async return value: A Promise which will be resolved with the value returned by the async function, or rejected with an exception thrown from, or uncaught within, the async function.
However,function no.1 returned promise object with a returned value as a promiseResult. function no.2 returned promise object with a "undefined" as a promiseResult.
async function foo1(){ return 1 }
console.log(foo1()) // Promise{promiseResult:1}
async function foo2(){
setTimeout(()=>{return 1},1000)
}
console.log(foo2()) //Promise{promiseResult:undefined}
I wonder why, second function won't return a value 1 wrappd with promsie object. Is that just ES6 stardard ??