Put in order · JavaScript and TypeScript course · Module 4: Asynchronous JavaScript
try-catch with await Syntax
Arrange the elements of error handling in async/await:
Items to put in order
- try {
- } catch(error) {
- console.error(error) }
- const data = await fetch(url)
You can check the correct answer by solving this task in the CodeWorlds game.