What is the purpose of the 'fetch' API in JavaScript?
Correct Answer: The 'fetch' API is used to make network requests to retrieve data from a server.
- Step 1: Understand that the 'fetch' API is a tool in JavaScript.
- Step 2: Know that it helps you get information from a server over the internet.
- Step 3: Think of it like asking a friend for a book; you send a request, and they send the book back to you.
- Step 4: The 'fetch' API can also send data to a server, like giving your friend a book to keep.
- Step 5: It works with promises, which means it can handle the response when it arrives.
No concepts available.