Concept Flow - Iterating over arrays
Start with array
Set index i = 0
Check: i < array.length?
No→Exit loop
Yes
Access array[i
Execute loop body
Increment i by 1
↩Back to Check
We start with an array and an index at 0. We check if the index is less than the array length. If yes, we access the element at that index, run the loop body, then increase the index by 1. Repeat until the index reaches the array length.