What is for loop?

March 10, 2010 at 08:38:56
Specs: Windows XP
I am only 8 years old and I want to know about for loop and arrays more clearly.

See More: What is for loop?

Report •

March 10, 2010 at 08:45:37
Here you go. http://www.javascriptkit.com/javatu...

Google is your friend



Keyboard not present,press F1 to continue...

Report •

March 16, 2010 at 08:20:03
If you are interessted in PHP For Loops, then according to PHP Tutorials the for loop is simply a while loop with a bit more code added to it. The common tasks that are covered by a for loop are:
Set a counter variable to some initial value.
Check to see if the conditional statement is true.
Execute the code within the loop.
Increment a counter at the end of each iteration through the loop.
 for (init; condition; increment)
    code to be executed;

init: Mostly used to set a counter (but can be any code to be executed once at the beginning of the loop)
condition: Evaluated for each loop iteration. If it evaluates to TRUE, the loop continues. If it evaluates to FALSE, the loop ends.
increment: Mostly used to increment a counter (but can be any code to be executed at the end of the loop)

Report •
Related Solutions

Ask Question