| LOOPS Loops: loops create a repetitive action while a condition is met. Then are great when you want to execute a segment of code an arbitrary number of times. Anytime you have to count, you can use a loop to save on typing code. This is a WHILE loop… // While Loop while (condition) OR var i:Number = 0; while (i <= 10) WHILE indicates we want to start a loop. // For Loop for (initializer; condition; action){ OR for (var i:Number = 0; i <= 10; i++) { For loop executes code block for a certain number of repetitions until the condition is met.
|