# Infinite Loop

*noun*

say it: **“IN-fih-nit LOOP”** **/ˈɪnfənɪt ˈlup/**

A loop that never stops, because nothing inside it ever makes its condition change.

## What is an **infinite loop** in PowerShell?

An **infinite loop** is a loop that never ends, because nothing inside it changes the answer to its condition. It fills the screen with the same line until you press **Ctrl+C**, which stops it without harm.

```powershell
$fuel = 40
while ($fuel -lt 100) {
    "Fuel at $fuel%"      # nothing adds to $fuel
}
# Fuel at 40%
# Fuel at 40%   ...until Ctrl+C
```

## In a sentence

- “Sam forgot to add to $fuel, and his script fell into an **infinite loop**.”
- “Press Ctrl+C to stop an **infinite loop**.”

Level: Novice · [More PowerShell terms at this level](https://www.ask-codey.com/glossary?category=powershell&level=1)

Updated: November 10, 2026

## In other subjects

- [Infinite Loop in C#](https://www.ask-codey.com/glossary/infinite-loop-c-sharp)
- [Infinite Loop in Java](https://www.ask-codey.com/glossary/infinite-loop-java)
- [Infinite Loop in JavaScript](https://www.ask-codey.com/glossary/infinite-loop-javascript)
- [Infinite Loop in Python](https://www.ask-codey.com/glossary/infinite-loop)

Source: https://www.ask-codey.com/glossary/infinite-loop-powershell
