> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sourcery.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Avoid-Infinite-Loops

#### Sourcery rule id: `avoid-infinite-loops`

#### Description

Avoid loops with missing or constant end conditions.


#### Match

```javascript
for (;;) {console.log("forever")}
```



#### Explanation

Loops with a constant condition, or no terminator, can be useful in certain contexts, but it's easy to forget
to break out of them. This rule highlights loops which may never end.
