I want to start my interval and then after 30 seconds, I will stop it and then sleep 1 second, then start it again. How should I do this?
function worker() {
var randomValue = Math.random()
console.log(randomValue);
}
var interval = setInterval(worker, 100);