can someone proofread my code and correct it in order to get the correct result. CODE
can someone proofread my code and correct it in order to get the correct result.
CODE
<!DOCTYPE html>
<html>
<head>
<!--
CIS213 Unit 3, Graded Exercise 2
Author:
Date: 4/18/2022
-->
<meta charset="utf-8" />
<meta name= "viewpoint" content= "width=device-width,initial-scale=1.0">
<title> Unit 3 Guided Practice 3 </title>
</head>
<body>
<h1>, Guided Practice<h2/>
<img id="imgJackhammer" src="jackhammer0.gif" width="113" height="100"
alt="Image of the man with a jackhammer." /><br>
<button onclick="startBouncing() ">Start Bouncing</button>
<script>
//declare and fill array of jackhammer man image filenames
var jackhammers = ["jackhammer0.gif", "jackhammer1.gif"
, "jackhammer2.gif", "jackhammer3.gif" "jackhammer4.gif"
, "jackhammer5.gif", "jackhammer6.gif" "jackhammer7.gif"
, "jackhammer8.gif", "jackhammer9.gif" "jackhammer10.gif"];
var curJackhammer = 0;
function bounce() {
curJackhammer = (curJackhammer === 10) ? 0 : ++curJackhammer
var imgHolder = document.getElementById("imgJackhammer");
imgHolder.src = jackhammers[curJackhammer];
}
function startBouncing() {
setInterval(bounce , 90);
}
</script>
</body>
</html>
Step by step
Solved in 3 steps with 1 images