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.
Thank you for spotting that out Mattias, it was a mistake, and the code as been edited.
What is a Promise?
Take a look at MDN
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.