JavaScript Assignment #14
Simple Slide Show
Build a simple slide show in JavaScript. This assignment builds on the concepts of all of the previous assignments and introduces the concepts of decision making with conditional statements.
- Create a basic page in html that displays a single image.
- In a set of <script> tags in the <head> section of your page, create a function to store your JavaScript program.
- Create a variable outside of the function, initialized to zero.
- Each time the user clicks on the image, call the function.
- Each time the function is called, increment the variable by 1.
- Each time the function is called, and after the variable is incremented, use conditional statements to check the value of variable and then change the image to a unique image when the variable is a certain value.
- Do this until 4 additional unique images have been displayed to the user.
(hint: examples here)
Next assignment ... Assignment #15