How does a for loop works?

A for loop is a repetition control structure which allows us to write a loop that is executed a specific number of times . The loop enables us to perform n number of steps together in one line. In for loop, a loop variable is used to control the loop.

Read more