Skip to content

Latest commit

 

History

History
53 lines (36 loc) · 586 Bytes

Space.md

File metadata and controls

53 lines (36 loc) · 586 Bytes

Space after `

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