Put in order · JavaScript and TypeScript course · Module 4: Asynchronous JavaScript
HTTP Request Handling Steps with async/await
Arrange the steps of fetching data from an API:
Items to put in order
- const data = await response.json()
- Return or display the data
- const response = await fetch(url)
- Check response.ok
- Call async function fetchData()
You can check the correct answer by solving this task in the CodeWorlds game.