+ 2
Boolean Operator Precedence
The examples in this section are sort of vague. Are we interpreting this as (not 1) == 1, or as not (1 == 1)?
5 Antworten
+ 2
(not 1) == 1
this is correct precedence.
first unary operator comes then binary.
+ 2
Is 1 = 1 ?
0
Because the answer is same either way.
0
1 === 1
0
It is interpreted as not (1==1)
first 1==1 implies True
Then not(1==1) implies not(True) which is False