JavaScript·Intermediate·Coding·1 min read
What does an async function return?
Short interview answer
It always returns a promise. Returning a normal value fulfills that promise; throwing rejects it. Returning another promise causes the outer promise to adopt its state.
Key takeaway
Explain the underlying mental model clearly, then support it with a concrete example and its trade-offs.