A JSON API is a web service that responds with data in JSON format. You request data from a URL (an API endpoint) and it sends back structured data your app can work with.
fetch()
— networks are unpredictable.
fetch()
requests data from a URLresponse.json()
converts the response to a JS object.then()
to handle the resolved data.catch()
for errors (like bad URLs or network problems)