This is my code
function countdown(integer)
{
for i = integer, 0, -1 do
{
document.write(i);
}
}
What I am trying to do is have a loop do what I want it to do, and what I want it to do is..
for i = integer, 0, -1 do
i
= The variable of the current loop
integer
= Starting the loop at the integer called by the user
0
= The ending of the loop
-1
= The increment of the loop
The above is solved, the problem now is it is only showing "->1<-".
function countdown(integer)
{
for( var i = integer; i > 0 ; i-- )
{
setTimeout(document.getElementById("cds").value="->"+i+"<-",1000);
}
}