- Hashtags if switch while do until for foreach - Version 2019
PowerShell Copy i0 varB 10,20,30,40 foreach (val in varB) if (val -eq 30) break i Write-Host "30 was found in array index i" In this example, the foreach statement iterates the varB array
0 brings some performance improvements to the ForEach loop