Now we have a and b.
$a = $true;
$b = $false;
$aAndB = $a -and $b
return $aAndB;
Which outputs False
. Very correct.
Now make that command to two lines.
$a = $true;
$b = $false;
$aAndB = $a `
-and $b
return $aAndB;
Which outputs:
False
But if you add a space after
`
$a = $true;
$b = $false;
$aAndB = $a ` <---- There is a space here
-and $b
return $aAndB;
Which outputs:
True
What a strange behavior of PowerShell!
Repro env: Windows 10, PowerShell Core 7.0.3