Click in order · JavaScript and React course · Module 11: Data Fetching and APIs
try/catch Block with async/await
Arrange the error handling syntax with async/await:
Items to click
- try {
- } catch (error) {
- const data = await fetch(url);
- console.error(error); }
You can check the correct answer by solving this task in the CodeWorlds game.