Private/GetResult.ps1
function GetResult($items, $userInput) { [string[]]$result = @(); $selections = $userInput.Split(' '); foreach ($index in $selections) { $result += $items[$index - 1]; } $result; } |
function GetResult($items, $userInput) { [string[]]$result = @(); $selections = $userInput.Split(' '); foreach ($index in $selections) { $result += $items[$index - 1]; } $result; } |