I have read the relevant pages on w3schools and other similar questions here but cannot seem to understand what\'s wrong about the following bit :
var myfunc
the while method runs quickly and all timeout almost gets executed after first second.. what you can do is
$timeout from myfunc03 for next value i*1000Also, as others pointed out you can't call functions with params like that from setTimeout
use anonymous function like
...
while (i<100) {
setTimeout(
function(i){
myfunc03(i);
}, i*1000);
i++;
}
...
for that