Multiple choice technology

What will be the value of $X if the below statement will be executed? $X = (1 -eq 1) -and (2 -eq 2)

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The expression (1 -eq 1) evaluates to True, and (2 -eq 2) also evaluates to True. The -and operator performs a logical AND between these two True values, which results in True. In PowerShell, comparison operators like -eq return boolean values, and -and requires both operands to be True for the result to be True.