I've been using PowerShell extensively since 2014 and I had no idea you could declare your arguments in the function definition's opening parentheses. I always did it like:
function ass
{
param
(
$has_donk = $true
)
}
Even if this is better practice I'm just shocked I didn't know you could do it the "traditional" way.
11
u/[deleted] Sep 17 '20 edited Oct 09 '20
I've been using PowerShell extensively since 2014 and I had no idea you could declare your arguments in the function definition's opening parentheses. I always did it like:
Even if this is better practice I'm just shocked I didn't know you could do it the "traditional" way.