Stopping Early: `break` and `continue`

A loop keeps a count or a running total in a variable started before it, continue skips the rest of one pass and goes on with the next item, break leaves the loop at once, and inside ForEach-Object return skips an item instead.

Updated

Cheat sheet for the lesson Stopping Early: `break` and `continue`: A loop keeps a count or a running total in a variable started before it, continue skips the rest of one pass and goes on with the next item, break leaves the loop at once, and inside ForEach-Object return skips an item instead.
Category
PowerShell
Level
Apprentice
Tags
break, continue, import-csv, loop-counter, powershell