+ 1
Event that triggers at random time intervals
How do I create an event that triggers at random time intervals with JavaScript?
2 odpowiedzi
+ 2
let a=Math.floor(Math.random()*500);
setTimeout(print,a)
function print(){
a=Math.floor(Math.random()*7000);
document.body.innerHTML=""+a;
setTimeout(print,a);
};
+ 1
Thank you!