When $a = 1 and $b = 2, all of the following statements evaluate to true except,

Options
- $a == 1 and $b == 2
- $a == 2 or $b == 2
- ($a == 2 and $b == 1) or $b == 2
- $a === 1 or $b ==1


CORRECT ANSWER : $a === 1 or $b ==1

Discussion Board
When $a = 1 and $b =2, all of the following statements evaluate to true except,

the 2nd and 4th answers should evaluate to true for the same reasons. The answer says that the 4th is the correct answer: that ($a == 1 or $b == 1) will evaluate to false.

tom williams 12-4-2013 11:33 AM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement