Created
August 2, 2025 15:36
-
-
Save davidystephenson/9697e4669a23e0574996f37920b0848f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<img id="image" widt="400"/> | |
<script> | |
async function download () { | |
const response = await fetch('https://dog.ceo/api/breeds/image/random') | |
const data = await response.json() | |
console.log('data', data) | |
const image = document.getElementById('image') | |
image.src = data.message | |
} | |
download() | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment