Pause within a FOR loop

How can I pause within a for loop?

Not do some other function or pause the playhead, just:

for (i=0;i<=10;i++) {
trace(i);

   wait for 1 second;

   trace(i);

   wait for another second;

}

I can’t make it wait within the loop. I can use setTimeout or setInterval to delay the calling of the for loop, but once it’s called it just flips through all the iterations.