每日進度4 (Ajax) Flashcards

1
Q

an async function always returns ???

A

an async function always returns a Promise fulfilled with return value

async function testAsyncFunction () {}
console.log(testAsyncFunction()); // Promise { undefined }

async function testAsyncFunction2 () { return ‘yo’; }

How well did you know this?
1
Not at all
2
3
4
5
Perfectly