js promise do something every x second 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)