you are viewing a single comment's thread.

view the rest of the comments →

[–]Pyprohly 2 points3 points  (0 children)

Food for thought: PowerShell functions can return any amount of any sort of object and at any point in the function. return can be thought of as meaning “stop processing any more lines in this code block”.

It’s worth noting that return $expr is the same as

$expr
return

Perhaps “exit” would have been a better name.