The for loop is structured like this: for(i=0;i<10;i++)
for(i= (any number you want to start with);
i < (a number to compare i with, if its’ true the loop will execute, if false the loop will stop executing);
i += (how many times you want to increment i each time you complete one loop)
)
The for loop is important because it makes it possible to loop through many array values to output into a table or check for specific values inside arrays. Our exams will have arrays that have either 100-400 elements inside them. a for loop is efficient to cycle through each value in an array from position 0 onward to the end of the array.
More detail and fun practice problems will now follow.