Intro
A for loop is used within programming whenever we need to repeat something a known number of times. If you know exactly the number of times you need to repeat an action, you should use a for loop. If you don't know when the repetition will finish, then look at using a for loop. If you need to specifically do something to the contents of an array, then you might want to use a for-in loop.
The general form for a for loop is as follows :