loop(food = 0; foodNeeded = 10) { if (food >= foodNeeded) { exit loop; // We have enough food; let's go home } else { food += 2; // Spend an hour collecting 2 more food // loop will then run again } } By the way, i++ is equivalent to i = i + 1. This step allows you to declare and initialize any loop … First we set the value of $x to 1. VBScript For Loop. wahr, falsch, loop ( Boolesches Attribut ) default-Wert. Syntax: