What decides if a value is returned from a PowerShell function?
This section discusses the specific statements from your sample functions. See the bottom section for background information. $n = 1 and $n++ are assignments and therefore do not produce output. $n is an expression whose value is output $null – ditto, but even though it is output, it doesn’t display by default ($n++) – due … Read more