for loop explained code example
Example 1: for loop
for (let i = 0; i < array.length; i++) {
}
Example 2: for loop
for(int i = 0; i < some_number; i++){
//inside loop do whatever you want
}
Example 3: for loop
fruits = ['apple', 'orange', 'peach']
for fruit in fruits:
print(fruit)