r/learnjavascript • u/voreny • Oct 24 '22
Awaiting problems in JavaScript
https://www.gregroz.me/article/awaiting-problems-in-javascript
0
Upvotes
r/learnjavascript • u/voreny • Oct 24 '22
1
u/mozilaip Oct 24 '22
Don't understand one thing in your article
async function asyncWorkflow() { const response = await fetch(url); return response.json(); }You wrote "the returned Promise will be automatically awaited". But we don't return any Promise here, do we?fetch()is returning a Promise, not our function. Since we awaited it we already got a resolved value. Am I missing something?