Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Giphy starter code
<!DOCTYPE html>
<html>
<div id="container"></div>
<script>
var query = 'dog';
var apiKey = '7LzHKvaZaAylJUePuMZS2NnXYVsVgm61';
var giphy = `https://api.giphy.com/v1/gifs/search?api_key=${apiKey}&q=${query}&limit=10&offset=0&rating=G&lang=en`
// ------------------------------------
// YOUR CODE
// Get handle of div "container"
// ------------------------------------
async function fetchGiphy(){
// ------------------------------------
// YOUR CODE
// 1 - Use fetch to giphys
// 2 - Use await, loop through data
// 3 - Write items to console
// 4 - Load images on browser
// ------------------------------------
}
fetchGiphy();
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.