I need to input two arrays and the output is an array that contains the two arrays.
Thank you for your time.
$firstArrayPair = @(1,2)
$secondArrayPair = @(1,4)
Function OutputNestedArray {
Param
(
[Parameter(Mandatory=$true,
ValueFromPipelineByPropertyName=$true,
Position=0)]
$arrayONE,
[Parameter(Mandatory=$true,
ValueFromPipelineByPropertyName=$true,
Position=1)]
$arrayTWO
)
$NewNestedArray = @()
$NewNestedArray = $arrayONE + $arrayTWO
return $NewNestedArray
}
$finalOutput = OutputNestedArray -arrayONE $firstArrayPair -arrayTWO $secondArrayPair
# The output needs to be an array containing 1 and 2.
# I can accept Arraylist or array
$finalOutput[0]
$finalOutput[0] : The output needs to be an array containing 1 and 2
is? It's not defined as a function or alias anywhere in your script, yet you call@(is )