0
why does not it work // почему код не выводит 6000?
function myAlert() { alert("Hi"); } setInterval(myAlert, 3000); clearInterval(myAlert, 6000);
3 Respostas
+ 3
function myAlert(){ alert("Hi"); }
var i = setInterval(myAlert, 3000);
setTimeout(function(){ clearInterval(i) },6000);
+ 3
because you have to assign setInterval to a variable then clear it I think
0
Mert Yazıcı
why does not it work like I did?