Anyways in powershell i have the following script
function ReturnTrue()
{
write-host "ReturnTrue executed!"
return $true
}
if (ReturnTrue -and ReturnTrue -and ReturnTrue)
{
write-host "ReturnTrue should have executed 3 times"
}
The expected output is to see "ReturnTrue executed!" printed 3 times but it's only printed once. Similar code in C# or Java would have executed ReturnTrue() 3 times. What's the deal?