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 rep
setTimeout
const myFunction = () => { setTimeout(() => { document.getElementById('demo').innerHTML = Date(); myFunction(); }, 10000); }
Easiest, but not efficient way!