javascriptclearInterval
function f1(){
count=20;
setInterval(
function(){
document.getElementById('c').innerText=count;
if(count>0){
count--;
}
else{
document.getElementById('a').innerHTML=`<h1>
End Sale</h1>`;
clearInterval(this);
}
}
,1000
)
}
Comments
Post a Comment