What causes a loop to be infinite?

An infinite loop occurs when a condition always evaluates to true . … This is a silly example, but it’s common for infinite loops to accidentally occur. Most of the times, it’s because the variables used in the condition are not being updated correctly, or because the looping condition is in error.

Read more