Previous Example-|-Next Example-|-Return to Chapter Listing
Example 6.14:
Mimicking a 'for' Loop with Nested if Statements
The button calls function1(), which executes the code which is equivalent to the 'for' loop in Example 6.13. Compare the scripts, and you'll see the 'for' loop is far simpler:
This is the script we used:
Previous Example-|-Next Example-|-Return to Chapter Listing