Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Snippet for fetching jokes from the REST API endpoint
fetch('/jokes?_embed=ratings')
.then(response => response.json())
.then(data => {
jokes.push(...data)
displayNextJoke()
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment