Loading topic
while loop repeats work for as long as a condition is true. It is useful when a program needs to keep going until something changes. For example, a program might keep asking for input until the user types a special word.7 min readdo-while loop runs its work before it checks whether to repeat. That means the loop enters its body at least once, even if the test would be false at the start.7 min readfor loop visits each value in an array. It is useful when you want to read every value and do not need its position.7 min read