Skip to content

Instantly share code, notes, and snippets.

@woat
Created January 6, 2018 09:30
Show Gist options
  • Save woat/6f5ebe6665756285423d25fd4dfe3659 to your computer and use it in GitHub Desktop.
Save woat/6f5ebe6665756285423d25fd4dfe3659 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<h1 id="lilpump"></h1>
<script>
const url = "PUT THE URL HERE"
fetch(url)
.then(response => response.json())
.then(data => {
document
.getElementById('HMM WHAT SHOULD GO IN HERE?') // hint: look at the h1 tag's id attribute in the body
.innerHTML = AND_WHAT_SHOULD_BE_HERE // hint: we need to access the first object's name
})
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment