Does a async function which returns Promise have an implicit return at the end of a block?

What happens with a Promise

Same thing with a function that returns void. A void function returns undefined. A Promise<void> resolves to an undefined.

function foo(){}; console.log(foo()); // undefined
async function bar(){}; bar().then(res => console.log(res)); // undefined

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)