DeveloperBreeze

Fetching Chuck Norris Jokes from API in JavaScript

const apiUrl = 'https://api.chucknorris.io/jokes/random';
fetch(apiUrl)
    .then(response => response.json())
    .then(data => console.log('Chuck Norris Joke:', data.value))
    .catch(error => console.error('Error:', error));

Continue Reading

Handpicked posts just for you — based on your current read.

Discussion 0

Please sign in to join the discussion.

No comments yet. Start the discussion!