PowerShell - Variables and Data Types
Why does the following PowerShell code output only a single element?
$arr = @(1, 2, 3)
$arr = $arr[1]
Write-Output $arr
$arr = @(1, 2, 3)
$arr = $arr[1]
Write-Output $arr
15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions