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

iVGeek/image-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Generator

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.


Launch

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

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

Releases

No releases published

Packages

No packages published