Who knew programmers could be funny?
Write an function that makes an API call to https://xkcd.now.sh/?comic=latest
- Create a
HTML,CSSandJavaScriptfile to write your code in
- Inside the same file write a program that gets the
jsonusing Fetch. - A function should make an API call to the given endpoint:
https://xkcd.now.sh/?comic=latest - Log the received data to the console
- Render the
imgproperty into an<img>tag in the DOM - Incorporate error handling