Question: Could someone help me correct my code to fit the instructions in the picture attached ? I'm not sure why my code isn't executing as
Could someone help me correct my code to fit the instructions in the picture attached ? I'm not sure why my code isn't executing as the instructions says it should. Below is a copy of my code as well.
Jogger
var runner = new Array(6);
var currunner = 0;
var begin;
runner[0] = new Image();
runner[0].src = "runner0.jpg";
runner[1] = new Image();
runner[1].src = "runner1.jpg";
runner[2] = new Image();
runner[2].src = "runner2.jpg";
runner[3] = new Image();
runner[3].src = "runner3.jpg";
runner[4] = new Image();
runner[4].src = "runner4.jpg";
runner[5] = new Image();
runner[5].src = "runner5.jpg";
function turn() {
if (currunner == 5)
currunner = 0;
else
++currunner;
document.runner.src = runner[currunner].src;
}
function startTurning() {
if (begin)
clearInterval(begin);
begin = setInterval("turn()",400);
}
onClick="clearInterval(begin);">
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
