I want my program to be executed with delay between each execution. Now I have this:
function function0() {
setTimeout(function1, 3000);
setTimeout(function2, 3000);
setTimeout(function0, 3000);
}
There is delay between each execution of function0 but not between function1 and funtion2, function2 is run immediately after function1. How do I solve this?
setTimeoutis non-blocking.