I am wondering if anyone can explain the behavious of comparison operators when using booleans and integers.
Why do the following statements produce the results they do?
false < = 9 // true
false >= 9 // false
Thanks
I am wondering if anyone can explain the behavious of comparison operators when using booleans and integers.
Why do the following statements produce the results they do?
false < = 9 // true
false >= 9 // false
Thanks
The representation of false
in memory is 0. That's why you obtain those results.