Question · JavaScript and TypeScript course · Module 4: Asynchronous JavaScript
Fetch API - GET Method
What does the fetch() function return in JavaScript?
Answer options
- JSON data directly
- A Promise that resolves to a Response object
- A string with data from the server
- An XMLHttpRequest object
You can check the correct answer by solving this task in the CodeWorlds game.