repeat every 2 seconds javascript code example
Example: js do every x seconds
window.setInterval(function() {
// do stuff
}, 1000); // 1000 milliseconds (1 second)
window.setInterval(function() {
// do stuff
}, 1000); // 1000 milliseconds (1 second)