Use the Joke API to dynamically add a fresh dad joke to the DOM.
Try testing this API in Postman. Make a GET request to the following URL and look at the JSON object that gets returned
https://official-joke-api.appspot.com/jokes/random
Requirements
-
When a user clicks the "Tell me a joke" button, they should see a joke setup and punchline on the screen
-
Every time the user clicks the "Tell me a joke" button they should see a new joke and the old one should be replaced
Advanced Challenge
- When a user clicks the "Tell me a joke" button, they should only see the joke's setup. They should also be presented with another button that says "Show Punchline". Clicking that button should reveal the joke's punchline