DEV Community

Discussion on: Beginners Guide To Fetching Data With (AJAX, Fetch API & Async/Await)

Collapse
 
mpj profile image
Mattias Petter Johansson • Edited

Note that response.json() returns a PROMISE. This is a common misconception. This article is a wee bit misleading in the async / await example, the data variable will be a promise but the example sort of makes it seem like response.json() is sync by not using await in front of the call.

Collapse
 
ronaldoperes profile image
Ronaldo Peres

What is a Promise?

Collapse
 
aglamadrid19 profile image
Alvaro Lamadrid • Edited
Collapse
 
bjhaid_93 profile image
/[Abejide Femi Jr]\s/

Thank you for spotting that out Mattias, it was a mistake, and the code as been edited.
Cheers.