[Solved] For loops in JavaScript

[ad_1]

according to your update, I guess you do not need the for loop, you need this,

demo

function countdown(integer) {
   var time = setInterval(function(){
        document.getElementById("cds").value="->"+(integer--)+"<-"
        if (integer == 0) clearInterval(time);
    },1000);
}​

1

[ad_2]

solved For loops in JavaScript