javascript setinterval run immediately in loop code example
Example: javascript setinterval run immediately
foo()
setInterval(foo, delay)
// OR
function foo() {
// ...
setTimeout(foo, delay)
}
foo()
foo()
setInterval(foo, delay)
// OR
function foo() {
// ...
setTimeout(foo, delay)
}
foo()