I need to declare an array parameter in an called PS script. The array coming in from the caller/source script is in a hash table:
$Array = @(1, 2, 3)
$myHashTable = @{myArr = $Array}
Call: Z:\called.ps1 $myHashTable
In 'called.ps1', what is the difference between
Param(
$myArr
)
,
Param(
[array] $myArr
)
and
Param(
[array[]] $myArr
)
?