Skip to content

Expand AboutLoopsAndPipelines to cover edge cases / misunderstandings #404

@vexx32

Description

@vexx32

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions