i thought that inside all loops (except the "for" loop ) we must use wait();
You have to use wait when you want to wait a certain time or number of frames. wait does not have anything to do with loops in the first place. There are just many cases when a loop and wait go hand in hand, for example for continuously updating a certain property of an entity.
Always learn from history, to be sure you make the same mistakes again...