js set timeou code example
Example 1: javascript settimeout
setTimeout(function(){ alert("Hello"); }, 3000);
Example 2: javascript setinterval
setInterval(function() {
//Your code
}, 1000); //Every 1000ms = 1sec
setTimeout(function(){ alert("Hello"); }, 3000);
setInterval(function() {
//Your code
}, 1000); //Every 1000ms = 1sec