On Friday, February 3, we posted a Friday Puzzle that shows a PowerShell function and a PowerShell class method that contain the same command sequence, including a statement with the Return keyword.
The puzzle asks: What does the function return? What does the class method return? And, of course, we want to understand why.
To solve this puzzle, I posted a video: What does the PowerShell Return keyword return? It’s a video explainer that examines the effect of using Return in a function and in classes, and it dives deep into the rules for using Return in a class method.
For more information, see: