Skip to content

Instantly share code, notes, and snippets.

View stej's full-sized avatar

Eska látor! stej

View GitHub Profile
@stej
stej / gist:2988139
Created June 25, 2012 11:46
trivia
$game = New-Object psObject -Property @{
players = @()
places = 0,0,0,0,0,0
purses = 0,0,0,0,0,0
inPenaltyBox = [bool[]](0,0,0,0,0,0)
popQuestions = @()
scienceQuestions = @()
This works:
$a = ''
$b = @('')
( $a -eq $b ) -ne ( $b -eq $a )
now, the ( $a -eq $b ) is true, because $b is converted to string -> all the array members are converted to string and then concatenated by $ofs ->
it equals ('' -eq '') which is true
then ( $b -eq $a ) means (@('') -eq '') - this returns all items from array (left operand) that are equal to right operand -> it's array of ''
now array of '' is converted to boolean value