Skip to content

In this project, images are pulled from the Lorem Picsum API and the photographer's name is displayed when a button is clicked.

Notifications You must be signed in to change notification settings

marisabrantley/image-generator-project

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Generator Project

In this project, images are pulled from the Lorem Picsum API when a button is clicked.

Objective

  • Create a function that randomly chooses one of the objects in the images array:

    • Use Math.random() and multiply it by the length of the array.
    • Use Math.floor() to round the number down to a whole number, aligning with one of the index positions.
  • Create a function to update the photographer’s name and the image URL for the randomly selected image.

  • Program the “Show me an image!” button with a click event to reveal the image and photographer’s name.


random-image-generator.mov

Launch

View the Image Generator here: https://marisabrantley.github.io/image-generator-project/

Class

Skillcrush, Break into Tech Blueprint

JavaScript Fundamentals

About

In this project, images are pulled from the Lorem Picsum API and the photographer's name is displayed when a button is clicked.

Topics

Resources

Stars

Watchers

Forks

Languages

  • JavaScript 36.4%
  • CSS 34.7%
  • HTML 28.9%