Skip to content

DelroyGayle/JavaScript-Core-3-Coursework-Week2

 
 

Repository files navigation

JavaScript-Core-3-Coursework-Week2

Dog photo gallery

Let's make a randomized dog photo gallery!

Write a function that makes an API call to https://dog.ceo/api/breeds/image/random. It should trigger after clicking a button in your webpage. Every time the button is clicked it should append a new dog image to the DOM.

  • Create an index.html file that will display your random image
  • Add 2 <button> and 1 <ul> element, either in the HTML or through JavaScript
  • When the button is clicked it should make an API call to https://dog.ceo/api/breeds/image/random
  • After receiving the data, append to the <ul> a <li> that contains an <img> element with the dog image
  • Incorporate error handling

Programmer humor

Who knew programmers could be funny?

Write an function that makes an API call to https://xkcd.now.sh/?comic=latest

  1. Create a HTML, CSS and JavaScript file to write your code in
  • Inside the same file write a program that gets the json using Fetch.
  • A function should make an API call to the given endpoint: https://xkcd.now.sh/?comic=latest
  • Log the received data to the console
  • Render the img property into an <img> tag in the DOM
  • Incorporate error handling

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 64.0%
  • CSS 22.0%
  • HTML 14.0%