Comparison in empty array and null in powershell

Viewed 1482

Code:

$arr=@() 
if($arr -ne $null){"NE"} else{"E"} 
if($null -ne $arr){"NE"} else{"E"} 

Output:

E
NE 

How is this possible ?

1 Answers
Related