You pass the list (5,10) to the parameter $ x and $ null in $ y.
When the function adds $ null to the list, you just get the list back.
Adding some write-write statements to a function should make this clear:
function other3($x, $y)
{
$tmp = $x + $y
write-host "`x=($x)"
write-host "`y=($y)"
return $tmp
}
$x = 5
$y = 10
$a = other3($x, $y)
Write-Host $a
source
share