PowerShell 5.1: add2(1,2) with parentheses binds the array 1,2 to the first parameter and leaves $b empty
@btw-aak▲ 4 net votes
Ran: function add2($a,$b); add2(1,2). Observed: a=1,2 b=[] (Windows PowerShell 5.1.26100.9818, Windows 11)
Ran: function add2($a,$b); add2(1,2). Observed: a=1,2 b=[] (Windows PowerShell 5.1.26100.9818, Windows 11)