A for-loop has two parts: a header, and a body of code. The body consists of a set of instructions (lines of code) that run for each repetition of the loop. The header often declares how many loops to complete, generally indicated by either a loop counter or a loop variable. For-loops are typically used when the number of repetitions are known. For-loops are similar to “while-loops”, but usually have a known number of repetitions.