activate code every 3 seconds js code example
Example 1: javascript setinterval
setInterval(function(){
console.log("Oooo Yeaaa!");
}, 2000);//run this thang every 2 seconds
Example 2: js do every x seconds
window.setInterval(function() {
// do stuff
}, 1000); // 1000 milliseconds (1 second)