A For Loop is used to repeat a section of code a specific number of times that is given. If the number of loops is not known then a while loop should be used in place of a for loop.
For Each Loops
A For Each Loop, much like a regular For Loop repeats a section of code a specific number of times, However, what makes this loop different is that it looks to each individual element one at a time.
A DOT Product is used to create scalers by multiplying DOT Products by vectors, doing this gives you a number which is the scaler.