I am trying to repeat setTimeout
every 10 seconds. I know that setTimeout
by default only waits and then performs an action one time. How can I repeat the process?
setTimeout(function() {
setTimeout(function() {
console.log("10 seconds");
}, 10000);
}, 10000);
See Question&Answers more detail:os