Describe "Koan(s) You Suggest"
There's sometimes a bit of a blurry line between loops and pipelines in PowerShell; we can expand the existing koans in AboutLoopsAndPipelines to cover some common misconceptions.
Context "The Scope of the Koans You Suggest"
foreach keyword v.s. foreach alias usage
- break/continue behaviour in loops and the highly dangerous behaviour when used in a pipeline
- clarify the function of
return in pipeline contexts and how they can be used to break out of a loop early, but not pipelines.
Context "Additional Information"
https://twitter.com/JustinWGrote/status/1282385547671924736?s=20
Describe "Koan(s) You Suggest"
There's sometimes a bit of a blurry line between loops and pipelines in PowerShell; we can expand the existing koans in AboutLoopsAndPipelines to cover some common misconceptions.
Context "The Scope of the Koans You Suggest"
foreachkeyword v.s.foreachalias usagereturnin pipeline contexts and how they can be used to break out of a loop early, but not pipelines.Context "Additional Information"
https://twitter.com/JustinWGrote/status/1282385547671924736?s=20